• Register
1 vote

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”,
            "watchface": true
            "dummy": 0
            "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 1 view
1 view
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 22 hours ago Mashhoodch 6.7k points
0 votes
1 answer 405 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 7.2K 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 46 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
0 votes
1 answer 148 views
Problem: I have fundamental knowledge on java , json and gson. I have below method: public static Object parseStringToObject(String json) {     String Object = json;     Gson gson = new Gson();     Object objects = gson.fromJson(object, Object. ... strange error message: "com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1"
asked Aug 4, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 385 views
Problem : Currently I am trying to display a JSON content using a API key. But I am unable to get a authentication. I am facing below error in my JsonObject: “Org.json.JSONException: Value Authorization of type java.lang.String cannot be converted to JSONObject” In my ... to pass a API key and URL id to get my JSON response in a URL. I display a JSON content using a JSON array.
asked Feb 2, 2020 jwilliam 3.9k points
0 votes
1 answer 6.2K views
Problem : I am running into the json parsing issue when using a ObjectMapper class from a com.fasterxml.jackson.databind package, and a error that I am getting is: com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of com.graybar.utilities.ups.beans. ... no control over a data I receive. Is there any annotation that needs to be added to be able to remove this issue?
asked Jan 18, 2020 jwilliam 3.9k points
0 votes
2 answers 690 views
Problem : I am facing following issue need solution return true if the string "cat" and "dog" appear the same number of times in the given string
asked Nov 13, 2019 peterlaw 6.9k points
0 votes
1 answer 18 views
Problem: Hello programmers! I am learning to program, and I just got a little confused about boolean values and logical operators. I tried to run the following program: #include<iostream> using namespace std; int main() { bool check = false && true || true; ... program, I got the following output: Condition evaluated to true I am so confused about how this condition evaluates to true. Any help?
asked Dec 18, 2020 Code Learner 5.5k points
0 votes
1 answer 16 views
Problem: Hi! I am a beginner and while attempting an exam of Java, I came across a multiple choice question which was as follows: In a project, 2 classes must contain main method (True/False) I chose False because as far as I know, if two or more classes have main ... . I want to know the correct answer with proper reason. If any of you can tell me the correct answer, I would be grateful. Thanks
asked Nov 29, 2020 Code Learner 5.5k points