4

Can someone please tell me whats wong with this code? Ive tried everything and don't know why it keeps giving me this error:

Parse error on line 3: ...", "shortName": “Simple”, "longN

----------------------------------------------^

Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['

{
    "uuid": "13371337-d579-4d75-a5c5-8dfcfe110f62",
    "shortName": “Simple”,
    "longName": “Simple”,
    "companyName": “pjtnt11”,
    "versionCode": 1,
    "versionLabel": “1.7”,
    "watchapp": 
        {
            "watchface": true
        },
    "appKeys": 
        {
            "dummy": 0
        },
    "resources": 
        {
            "media": []
        }
}

Thanks!

pjtnt11
  • 495
  • 2
  • 5
  • 22
  • 1
    the quotes look suspicious, like microsoft-added typesetters quotes. Make sure youre using the straight quotes (like youre using everwhere else) – Stuart Siegler Jan 18 '15 at 21:20

2 Answers2

10

You're using “ instead of " for many of your strings. Those may not look like different double-quote characters, but they are. Only the latter is valid in JSON.

This usually happens to me when pasting quotation marks from another program, especially office software that likes to make its quotes look as fancy as possible.

The corrected JSON would be:

{
    "uuid": "13371337-d579-4d75-a5c5-8dfcfe110f62",
    "shortName": "Simple",
    "longName": "Simple",
    "companyName": "pjtnt11",
    "versionCode": 1,
    "versionLabel": "1.7",
    "watchapp": {
        "watchface": true
    },
    "appKeys": {
        "dummy": 0
    },
    "resources": {
        "media": [

        ]
    }
}
Ixrec
  • 966
  • 1
  • 7
  • 20
0

Use the following json:

{
    "uuid": "13371337-d579-4d75-a5c5-8dfcfe110f62",
    "shortName": "Simple",
    "longName": "Simple",
    "companyName": "pjtnt11",
    "versionCode": 1,
    "versionLabel": "1.7",
    "watchapp": 
        {
            "watchface": true
        },
    "appKeys": 
        {
            "dummy": 0
        },
    "resources": 
        {
            "media": []
        }
}

The issue is your values not using correct quotation marks

Abhishek
  • 972
  • 3
  • 12
  • 24
Vuyisanani
  • 141
  • 1
  • 4