JSON
In JSON format, keys have to be surrounded by quotes.
JSON Example:
{
"name": "John",
"age": 30
}
JSON5
JSON5 is a superset of JSON that adds some extra features to the original JSON format, including the ability to use single quotes or unquoted keys.
JSON5 Example:
{
// This is a comment
name: 'John',
'age': 30,
}
Hjson
Hjson also allows for keys to be unquoted, as long as they don't contain spaces or other special characters. Hjson is essentially a more relaxed and forgiving version of JSON/JSON5 that allows for more flexibility in the formatting and syntax of the data.
Hjson Example:
{
// This is a comment
name: John
age: 30
city: New York
favorites: [
pizza
ice cream,
]
}