Closed pstanton closed 6 years ago
You mistake JSON with JavaScript. In JavaScript the name must only be quoted if it contains illegal characters like e.g. a dash (-
) or is a reserved keyword like e.g. null
or typeof
.
On the other hand the JSON specification explicitly says that
A string is a sequence of zero or more Unicode characters, wrapped in double quotes [...]
Your example code must be changed to
[{"fieldName":"value"}]
to be valid JSON.
You can validate JSON using tools like e.g. a online JSON validator.
fairnuf
[{fieldName:"value"}]
is valid json, however JsonParser throws:version: 0.9.4