Top 1,000 Features Creators Resources Blog Explorer Download
GitHub icon

JSON5

< >

JSON5 is an open source data notation created in 2012 by Aseem Kishore.

Source code:
git clone https://github.com/json5/json5
#127on PLDB 12Years Old 0Repos

JSON5 — JSON for humans


Example from the web:
{ // 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", }
Example from Linguist:
/* * The following is a contrived example, but it illustrates most of the features: */ { foo: 'bar', while: true, this: 'is a \ multi-line string', // this is an inline comment here: 'is another', // inline comment /* this is a block comment that continues on another line */ hex: 0xDEADbeef, half: .5, delta: +10, to: Infinity, // and beyond! finally: 'a trailing comma', oh: [ "we shouldn't forget", 'arrays can have', 'trailing commas too', ], }

Language features

Feature Supported Token Example
MultiLine Comments ✓ /* */
/* A comment
*/
Comments ✓
// A comment
Line Comments ✓ //
// A comment
Semantic Indentation X

View source

- Build the next great programming language · About · Acknowledgements · Extensions · Day 625 · feedback@pldb.io