user496949
user496949

Reputation: 86095

Does JSON require everything be quoted?

"success":true, is it same as "success":"true"

Upvotes: 4

Views: 362

Answers (2)

Chase Florell
Chase Florell

Reputation: 47387

no. The first is a boolean (true) the second is a string "true"

Upvotes: 1

Andy E
Andy E

Reputation: 344585

JSON requires that keys and string values are properly delimited with " quotes. Other values should not have quotes. This means that "success":true and "success":"true" are not the same — the first is a boolean value and the second is a string value.

For more information, see http://json.org.

Upvotes: 8

Related Questions