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 Programming AJAX Introducing JSON

" on true or false values

The teacher explains that all should use a pair of "", however, he doesn't use them when the values are true or false. Is this the only exception?

Why is that?

[
 {
  "name": "aimee",
  "inoffice": false
 }
]

1 Answer

Hi Silvia,

In JSON, all properties must be put inside " " and for values, you just write like you want. Here is an example:

//JSON Object { "name":"Victor Mercier", //String Data Type "age":15, // Number Data Type isTreehouseModerator:true //Boolean Data Type }

If that helped you, please mark as bets answer to indicate other students your issue is resolved!

Thank you, i understand now :)))