Can someone give me json5 example, whats new

0 votes
asked Mar 7 by anonymous

Whats new in JSON5, can somebody give me example.

What JSON version we use normally.

1 Answer

0 votes
answered Mar 7 by anonymous
edited Mar 7 by katib

Following example show almost all the new things included in JSON 5

    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',
Welcome , qPocho is an online community for programmers share there knowledge.