Most often JSON is used to represent an object, for example {"a": 0}
in which case you need the braces. However a simple value such as 0
or "some string"
on its own is also valid json and in that case must not have the braces.
Most often JSON is used to represent an object, for example {"a": 0}
in which case you need the braces. However a simple value such as 0
or "some string"
on its own is also valid json and in that case must not have the braces.