• Register
1 vote
2.3k views

Problem :

Can someone please tell me what is wrong with my code? I have tried almost everything and still unable to understand why my code keeps giving me below error:

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

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

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

 

My incorrect JSON is as below:

{
    "uuid": "133713371-d579-4d751-a5c5-8dfcfe110f621",
    "myshortName": “Simple”,
    "mylongName": “Simple”,
    "mycompanyName": “pjtnt11”,
    "versionCode": 1,
    "versionLabel": “1.7”,
    "watchapp": 
        {
            "watchface": true
        },
    "appKeys": 
        {
            "dummy": 0
        },
    "resources": 
        {
            "media": []
        }
}

 

7.5k points

Please log in or register to answer this question.

1 Answer

0 votes

Solution  :

You must be using “ instead of " for many of the strings in your JSON. And those may not look like incorrect double-quote characters, but they are incorrect for JSON. Only the latter is valid in any JSON.

This generally happens to me when I try to paste the quotation marks from the another program, especially the office software which likes to make the quotes look as fancy as possible.

Your corrected JSON is as below:

{
    "uuid": "133713371-d579-4d751-a5c5-8dfcfe110f621",
    "myshortName": "Simple",
    "mylongName": "Simple",
    "mycompanyName": "pjtnt11",
    "versionCode": 1,
    "versionLabel": "1.7",
    "watchapp": {
        "watchface": true
    },
    "appKeys": {
        "dummy": 0
    },
    "resources": {
        "media": [

        ]
    }
}

 

38.6k points

Related questions

0 votes
1 answer 91 views
91 views
Problem: Can someone please tell me what is wrong with my code: Expecting 'string', 'number', 'null', 'true', 'false', '{', '[', got 'undefined'.
asked Mar 14 Wafa Abu Yousef 6.1k points
0 votes
1 answer 78 views
78 views
Problem: Can someone help me figure out how to solve this,"expecting 'string', '}', got 'undefined'."
asked Apr 11 Humaira ahmed 50.7k points
0 votes
1 answer 11 views
11 views
Problem: Expecting property name enclosed in double quotes
asked Jun 30 asha 121k points
0 votes
1 answer 3 views
3 views
Problem : Is there a method to resolve this issue: Json.decoder.jsondecodeerror: expecting ',' delimiter?
asked Jun 25 Sifat55 108k points
0 votes
1 answer 6 views
6 views
Problem: I am looking for a solution to this : Valueerror: expecting property name: line 1 column 2 (char 1).
asked Jun 22 Priscilla Gurpreet 74.7k points
0 votes
1 answer 19 views
19 views
Problem: Can't find any solution, help : Expecting property name enclosed in double quotes: line 1 column 2 (char 1).
asked Jun 16 Aurelia Maja 78.4k points
0 votes
1 answer 2k views
2k views
Problem: I am using google geocode API to test the following Python3.5 code but receive the error below. raise JSONDecodeError("Expecting value", s, err.value) from None >JSONDecodeError: Expecting value
asked Jan 26 Mashhoodch 13k points
0 votes
1 answer 920 views
920 views
Problem : I am facing error “Expecting value: line 1 column 1 (char 0)” when trying to decode the JSON.The URL I use for a API call works fine in a browser, but gives above error when done through the curl request. The error happens at the return simplejson.loads(response_json)
asked Jan 20, 2020 jwilliam 3.9k points
0 votes
2 answers 14.5k views
14.5k views
Problem : I am trying to figure out the good way to load the JSON objects in the Python. I send below json data: {'http://example.org/about': {'http://purl.org/dc/terms/title': [{'type': 'literal', 'value': "Anna's Homepage"}]}} To my backend where it ... 1 column 2 (char 1)” I did lot of research on it but nothing seems to work for me. Any suggestions on my issue will be much appreciated.
asked Jan 7, 2020 alecxe 7.5k points
0 votes
1 answer 11 views
11 views
Problem: NameError: name 'false' is not defined
asked Jul 26 Sawyer Parviz 168k points