JSON++

JSON++ is a powerful data representation language that comes in the form of a strict superset of the popular JSON data language. It supports useful structures such as trees, graphs, and ordered dicts.

Syntax
JSON++ supports new types of data structure and possibly data type that JSON does not natively support, instead requiring that the user build them themselves. These structures and types, both old and new, are:

Note that a JSON++ file that does not have brackets at the toplevel will default to being a scalar, a list, an ordered dict, or a symmetric ordered dict, depending on the inner formatting.

Equivalence to JSON
Though this may change, it JSON is currently equivalent to JSON++. The correspondences are as such (note that the "Pure" JSON versions probably should be written as a length-2 list with the first argument being the type as a string):

JSON++ integers: 10 // decimal 0b10 // binary 0q10 // quaternary 0o10 // octal 0x10 // hexadecimal 0xII // Roman Numerals

Pure JSON integers: 10 // decimal 2 // binary 4 // quaternary 8 // octal 16 // hexadecimal 2 // Roman Numerals

JSON++ String: abc "narwhals" "I am\nthe walrus" "Hello, World!"

Pure JSON String: "abc" "narwhals" "I am\nthe walrus" "Hello,\nWorld!"

JSON++ Tuple: (5, 16)

Pure JSON Tuple: [5, 16]

JSON++ Chord: c"Hello, World!"

Pure JSON Chord: [72, 101, 108, 108, 111, 44, 32, 87, 111, 114, 108, 100, 33]

JSON++ Set: {1, 2, 3}

JSON Set: [1, 2, 3]

JSON++ Ordered Dict: [    3: "c", 2: "b", 1: "a" ]

Pure JSON Ordered Dict: {    "order": [3, 2, 1], "dict": [ 3: "c", 2: "b", 1: "a" ] }

JSON++ Symmetric Dict: {    "a" <=> 1, "b" <=> 2, "c" <=> 3, }

Pure JSON Symmetric Dict: "a", 1], ["b", 2], ["c", 3

JSON++ Ordered Symmetric Dict: [    "a" <=> 1, "b" <=> 2, "c" <=> 3, ]

Pure JSON Ordered Symmetric Dict: "a", 1], ["b", 2], ["c", 3

JSON++ Lispt: (+ 1 2 3)

Pure JSON Lispt: ["+", 1, 2, 3] or: {    "command": "+", "args": [1, 2, 3] }

JSON++ Edge: a -- b

Pure JSON Edge: ["a", "b"]

JSON++ DiEdge: a -> b

Pure JSON DiEdge: ["a", "b"]

JSON++ Graph: {| a, b, c, a -- b, b -- c, c -- a |}

Pure JSON Graph: "a", "b", "c"], [["a", "b"], ["b", "c"], ["c", "a"

JSON++ DiGraph: {| a, b, c, d, a -> b, b -> c, c -> a, c -> d |}

Pure JSON DiGraph: "a", "b", "c", "d"], [["a", "b"], ["b", "c"], ["c", "a"], ["c", "d" or: {    "a": ["b"],     "b": ["c"],     "c": ["a", "d"],     "d": [] }

JSON++ Matrix: [| 1 2 3 || 4 5 6 || 7 8 9 |]

Pure JSON Matrix: 1, 2, 3], [4, 5, 6], [7, 8, 9