JSON5 is an extension of JSON that keeps data friendly for humans and configuration files.
JSON5 is a superset of JSON that removes strict quoting requirements and adds comments, trailing commas and additional number forms. It is often used for configuration files and developer-friendly data.
{
name: 'json5', // unquoted key and single quote
version: 1.0,
features: [ // trailing comma allowed
'comments',
'hex numbers',
],
limits: { min: 0x10, max: Infinity },
}
// and multi-line comments with /* ... */ are allowed.0x), leading/trailing decimal points, and plus signs.Infinity, -Infinity and NaN are valid values.JSON requires double-quoted keys, no comments, no trailing commas and standard decimal numbers. JSON5 keeps the same value model but relaxes the text format so developers can write and read it faster.
// JSON
{"name":"Ada","tags":["dev","json"]}
// JSON5
{name: 'Ada', tags: ['dev', 'json',],}
You can format, validate and convert JSON5 with the JSON5 Formatter, JSON5 Validator, JSON5 to JSON and JSON to JSON5 tools on this site.