简体   繁体   中英

Basic JSON syntax?

Here is part of

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

I'm not too familiar with JSON syntax and I haven't found a source on the web that provides an introduction; when I try to parse each JSONObject in the JSONArray I get an error like

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

When I input into jsonlint:

Parse error on line 1:

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

What's wrong with my JSON?

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

Following http://json.org/

  • [ elements ] with elements as value ,
  • value as object ,
  • object as { members } ,
  • members as pair
  • pair as string : value
  • value as object
  • ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM