JSON5

JSON5 is an extension of JSON for human-written configuration. It adds comments, single-quoted strings, and trailing commas from ECMAScript 5.1 to JSON.

Example

This is the example from the site.

{
  // comments
  unquoted: 'and you can quote me on that',
  singleQuotes: 'I can use "double quotes" here',
  lineBreaks: "Look, Mom! \
No \\n's!",
  hexadecimal: 0xdecaf,
  leadingDecimalPoint: .8675309, andTrailing: 8675309.,
  positiveSign: +1,
  trailingComma: 'in objects', andIn: ['arrays',],
  "backwardsCompatible": "with JSON",
}

See also

  • Hjson , a different configuration format based on JSON. Comparison . Hjson adds features that are not compatible with ECMAScript.
  • TOML
  • YAML