Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does JSON require everything be quoted?

Tags:

json

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

like image 764
user496949 Avatar asked Jan 21 '23 01:01

user496949


1 Answers

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.

like image 64
Andy E Avatar answered Jan 31 '23 20:01

Andy E