Javascript JSON.parse返回“scanEscape a”

Javascript JSON.parse返回“scanEscape a”,javascript,json,qt,syntax-error,qml,Javascript,Json,Qt,Syntax Error,Qml,我有使用javaScript的QML本地存储。我通过JSON.stringify将对象放入其中。当我尝试使用JSON.parse从DB读取对象时,返回:scanEscape a,我没有找到对这个扫描错误JSON文件的引用: { "header": { "version": "2.5", "createdIn": "PickWorks - Linux", "modifiedIn": "PickWorks.appName", "modified": "2013/1

我有使用javaScript的QML本地存储。我通过JSON.stringify将对象放入其中。当我尝试使用JSON.parse从DB读取对象时,返回:scanEscape a,我没有找到对这个扫描错误JSON文件的引用:

{
  "header": {
    "version": "2.5",
    "createdIn": "PickWorks - Linux",
    "modifiedIn": "PickWorks.appName",
    "modified": "2013/12/07"
  },
  "properties": {
    "title": "We found a love",
    "authors": [
      {
        "name": "Rihana"
      }
    ],
    "transposition": -2,
    "tempo": {
      "type": "bpm",
      "value": "130"
    },
    "key": "C",
    "version": "2.5.4",
    "publisher": "GuitarTab",
    "keywords": [
      "find",
      "love",
      "deny"
    ],
    "verseOrder": "v1 b c v2 b c",
    "themes": [
      "love",
      "hopeless"
    ]
  },
  "lyrics": [
    {
      "title": "v1",
      "text": "[a]Yellow diamonds [F]in the light\n[C]And we're standing [G]side by side\n[a]As your shadow [F]crosses mine\n[C]What it takes to [G]come [a]alive.[F]\n",
      "items": {}
    },
    {
      "title": "v2",
      "text": "[a]Shine a light through [F]an open door\n[C]Love and life [G]I will divide\n[a]Turn away cause [F]I need you more\n[C]Feel the heart-[G]beat in my [a]mind.[F]\n"
    },
    {
      "title": "c",
      "text": "[a]We found love in a [F]hopeless place\n[C]We found love in a [G]hopeless place\n[a]We found love in a [F]hopeless place\n[C]We found love in a [G]hopeless place\n"
    },
    {
      "title": "b",
      "text": "[C]It's the way I'm feeling [G]I just can't [a]deny.[F]\n[C]But I've gotta [G]let it go\n"
    }
  ]
}
问题1:这是什么错误? 问题2:如何解决


注意:在Qt5.2b和5.1.1上测试的Bug实际上是Qt中遗漏了一些调试日志。创建错误跟踪后,问题得到解决,将在下一个稳定版本Qt 5.2.0中解决。

感谢Matt的编辑。。。我还不熟悉SO。JSON通过验证,因此您的问题可能存在于代码的其他地方。此外,您可以在这里看到它被正确解析并再次字符串化:我知道它是有效的&在浏览器实现中解析。问题是关于QML-Qt-javaScript的。这就是我的问题所在。对-只是可能是Qt的javascript实现本身的东西导致了问题,所以你的问题比JSON无效时困难得多;