4
I can represent a JSON object this way?
{
'helloWorld': true
}
4
I can represent a JSON object this way?
{
'helloWorld': true
}
4
No, only double quotes are allowed in JSON. The question example generates an invalid object as it can be tested in the link: http://jsonlint.com/
The right thing would be:
{
"helloWorld": true
}
Note that the property name is required to be in double quotes, so the following notation is also invalid:
{
helloWorld: true
}
3
To specification of the JSON format clearly states that only double quotes can be used, more specifically U+0022
.
Browser other questions tagged json
You are not signed in. Login or sign up in order to post.