HJSON
{
// No quotes on the value below.
a: b
c: ["d", "e", "f"]
g: 123
}
All code files in the custom shape format allow HJSON, a superset of JSON which allows comments, unquoted object keys, and flexibility around commas.
Note the missing trailing commas and the unquoted string value for b
. The unquoted string value for b
illustrates a potential gotcha in HJSON, where commas or other characters (anything after the ":") will be included in the string. For example, consider the following HJSON:
{"a": b}
This actually represents an object with the key/value pair of a
-> b, }
instead of a
-> b
, and results in a syntax error.
For more information about the HJSON format, see https://hjson.github.io/.
Updated 8 months ago