• Register
1 vote
1.6k 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": []
        }
}

 

6 5 3
7,540 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": [

        ]
    }
}

 

9 7 4
38,600 points

Related questions

0 votes
1 answer 16 views
16 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 3 views
3 views
Problem: Can someone help me figure out how to solve this,"expecting 'string', '}', got 'undefined'."
asked 1 day ago Humaira ahmed 9.6k points
0 votes
1 answer 339 views
339 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 667 views
667 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 10.1K views
10.1K 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 136 views
136 views
Can someone explain me why i am seeing this error that told me to use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $. How to solve it and what is reason behind this error?
asked Sep 14, 2020 Daniel Anderson 4k points
1 vote
1 answer 34 views
34 views
Problem : i'm using React router v^4.0.0, I've been having some trouble with react router. Router.js:43 Uncaught TypeError: Cannot read property 'location' of undefined at new Router (Router.js:43) at ReactCompositeComponent.js:295 at measureLifeCyclePerf ( ... .mountComponent (ReactReconciler.js:46) Any ideas on what I need to do to fix this? Thanks for your patience and help!!
asked Mar 21 Shovo210 13.3k points
0 votes
1 answer 2 views
2 views
Problem: I need assistance in resolving this problem in Is_uploaded_file() expects parameter 1 to be string, array given.
asked Apr 1 rakib1 51.5k points
0 votes
1 answer 26 views
26 views
Problem: What produced the error (“Type java.lang.string cannot be converted to jsonobject android.”)?
asked Mar 31 zayed1 30.9k points
0 votes
1 answer 34 views
34 views
Problem : Is there any annotation that needs to be added to be able to remove this issue: No string-argument constructor/factory method to deserialize from string value.
asked Mar 6 Wafa Abu Yousef 6.1k points