LiON (Lima Object Notation) is a lightweight data-interchange format. Its easy for humans to read and write and easy for machines to parse and generate. Its based on JSON and Lima object and string syntax.
Of course why create a new format if there aren't benefits.
- LiON can represent objects with arbitrary values as keys.
- The syntax is more compact for objects with string keys.
- Has a unified syntax for objects and lists.
- Can represent objects where multiple keys point to the same object, including objects with circular references.
A LiON value can be composed of a few different things. The diagram below describes how values can be created.
Note that {string=<value>} is the same as {"string":<value>}.
Also note that the "hexadecimal number" in a string represents a LimaEncoding character (usually the same as a unicode codepoint).
E.g. ""![2B 31] represents the string "+1".
The reference representation is a list value prepended with "~" where the list indicates the path from the root of the object to the
value being referenced. For example in {a={b=5 c=5} d=~{"a" "c"}}, d points to the value 5,
and {a={b=5 c=~{"a"}}} represents an object with a circular reference to the object named "a" in the top-level object.
Note that ~{} points to the top-level object. For example in {a={b=5 c=~{}}},
a.c points to the top-level object, meaning that a.c.a.b would be that 5.
