-1

这是一部分

[
UserJSONImpl{
    "id"=26136358,
    "name"='BryanConnor',
    "screenName"='thewhyaxis',
    "location"='null',
    "description"='TheWhyAxisisacollectionofindepthwritingaboutthevisualizationsthatdeserveyourattention.',
    "isContributorsEnabled"=false,

我对 JSON 语法不太熟悉,也没有在网上找到提供介绍的资源;当我尝试解析 JSONArray 中的每个 JSONObject 时,我收到一个错误,例如

Expected a ',' or ']' at character 14

当我输入 jsonlint 时:

Parse error on line 1:

[    UserJSONImpl{      
-----^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', ']'

我的 JSON 有什么问题?

4

1 回答 1

3
[
    {
        "UserJSONImpl": {
            "id": 26136358,
            "name": "BryanConnor",
            "screenName": "thewhyaxis",
            "location": null,
            "description": "TheWhyAxisisacollectionofindepthwritingaboutthevisualizationsthatdeserveyourattention.",
            "isContributorsEnabled": false
            }
    }
]

关注http://json.org/

  • [ elements ]elementsas value,
  • valueobject,
  • object{ members },
  • members作为pair
  • pair作为string : value
  • value作为object
  • ...
于 2013-08-22T16:30:11.983 回答