Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript AJAX Basics (retiring) Programming AJAX Introducing JSON

Matthew Sinclair
Matthew Sinclair
703 Points

jsonlint.com throwing an error

My code when entered to jsonlint.com is as follows:

[ { “name”: “Jim”, “inoffice”: false }, { “name”: “Pam”, “inoffice”: true } ]

The code in the lesson used in jsonlin.com is as follows:

[ { “name”: “Aimee”, “inoffice”: false }, { “name”: “Amit”, “inoffice”: true }, { “name”: “Ben”, “inoffice”: true } ]

Both of these examples throw an error on jsonlint.com

Is the lesson out of date or is jsonlint.com incorrect?

If the former, when will the lesson be updated? If the later is jsonlint an unreliable tool?

Or am I completely missing something?

2 Answers

James Sedghi
James Sedghi
21,549 Points

Hi,

The quote marks aren't valid characters. It's a subtle difference, but what you've posted is “ rather than " quotes.

The following validates for me:

[{
    "name": "Jim",
    "inoffice": false
}, {
    "name": "Pam",
    "inoffice": true
}]
Matthew Sinclair
Matthew Sinclair
703 Points

Ah!! That's what I get for copying and pasting from a text editor lol

That slight styling borked it!! Thanks for your time!!!