The blog published an article called A beginner’s guide to JSON, the data format for the internet in which it talks about the JavaScript Object Notation (JSON) serialisation format. It shows examples such as
The basic structure is built from one or more keys and values:
{ key: value }
and
For example, the following is valid JSON:
{ key: "String", Number: 1, array: [1,2,3], nested: { literals: true } }
Among other ones. However, the only example of valid JSON in the entire article is this one:
{ "hello": "world" }
Per the standard keys have to be enclosed in double quotes. If they are not, it is invalid.
For reference:
Please fix the article at the very least to have valid JSON since it talks about JSON.
[1, 2, 3]
) or even a int/string/boolean literal (42
, or"foo"
ortrue
) would be a valid JSON. Just because key-value-pairs is the most common choice, it doesn't mean is the only possibility.