JSON.parse返回“scanEscape a”

时间:2013-12-07 02:22:38

标签: javascript json qt syntax-error qml

我使用javaScript使用QML LocalStorage。在其中我通过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"
    }
  ]
}

Q1:这个错误是什么? Q2:如何解决?

P.S。:(在Qt 5.2b& 5.1.1上测试)

1 个答案:

答案 0 :(得分:0)

Bug实际上是在Qt中错过了一些调试日志。在创建Bugtrack问题时,问题已得到解决,并将在下一个稳定版本(Qt 5.2.0)中解决。