0

I'm working with a JSON file that was sent to me. I keep getting a parse error on line 7 (begins with "overview) of this JSON file. The error reads: Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['

I ran the JSON through JSONLint and got the same message. What's going on here? You can see the file below (I've only included the beginning here, since it's long. I tried removing the entry that causes the error to see if it was a random thing, but the "overview" name causes the same error on the next entry as well). Any thoughts would be very helpful!

{
    "page": 1,
    "results": [{
        "poster_path": "\/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg",
        "adult": false,
        "overview": "Last months of World War II in April 1945. As the Allies make their final push in the European Theater,
        a battle - hardened U.S.Army sergeant in the 2 nd Armored Division named Wardaddy commands a Sherman tank called Fury and its five - man crew on a deadly mission behind enemy lines.Outnumbered and outgunned,
        Wardaddy and his men face overwhelming odds in their heroic attempts to strike at the heart of Nazi Germany.
        ",
        "release_date": "2014-10-15",
        "genre_ids": [10752,
            18,
            28
        ],
        "id": 228150,
        "original_title": "Fury",
        "original_language": "en",
        "title": "Fury",
        "backdrop_path": "\/pKawqrtCBMmxarft7o1LbEynys7.jpg",
        "popularity": 11.717304,
        "vote_count": 2435,
        "video": false,
        "vote_average": 7.43

// more entries with the same name/value pairs... same error for next entry
// when I get to the "overview" name.

    }],
    "total_results": 70,
    "total_pages": 4
}
1
  • I think , you should set all value in double quotes , for ex => "video": "false" Commented Dec 10, 2016 at 23:42

1 Answer 1

1
  1. don't use comments
  2. don't break the lines (String Values) - "overview" property;

{
    "page": 1,
    "results": [{
        "poster_path": "\/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg",
        "adult": false,
        "overview": "Last months of World War II in April 1945. As the Allies make their final push in the European Theater, a battle - hardened U.S.Army sergeant in the 2 nd Armored Division named Wardaddy commands a Sherman tank called Fury and its five - man crew on a deadly mission behind enemy lines.Outnumbered and outgunned, Wardaddy and his men face overwhelming odds in their heroic attempts to strike at the heart of Nazi Germany.",
        "release_date": "2014-10-15",
        "genre_ids": [10752,
            18,
            28
        ],
        "id": 228150,
        "original_title": "Fury",
        "original_language": "en",
        "title": "Fury",
        "backdrop_path": "\/pKawqrtCBMmxarft7o1LbEynys7.jpg",
        "popularity": 11.717304,
        "vote_count": 2435,
        "video": false,
        "vote_average": 7.43
    }],
    "total_results": 70,
    "total_pages": 4
}

Sign up to request clarification or add additional context in comments.

2 Comments

and you don't have to quote all values, the JSON accepts Numbers, Strings, Booleans, Arrays, Objects and null :)
Thank you so much! Removing those carriage returns fixed it right up!!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.