Extended Organizing Notation (EON) is a data structure notation and programming language designed as a more user friendly alternative to XML with a QML-like syntax.
Despite being a markup language XML's versatility cannot be denied. Not only is it still utilized throughout multiple domains of programming, but its child language HTML is just as, if not more, widespread and successful. However when given the option programmers almost always elect to use JSON instead, even though it is not quite as flexible as XML. As a web developer I have made this choice on numerous occasions, and aside from the fact that JSON is inherent to JavaScript I strongly prefer using JSON over XML. This is primarily due to JSON's greater legibility and simplicity of interaction (via dot and bracket notation) no matter the programming language. In fact this remains true despite the availability of querying tools such as XPath and jQuery.
Consequently, I believe there is a need for a new data structure language that has both the capabilities of XML and the ease of use of JSON. EON is my solution for this need. While developing EON, I also realized that it could be useful to developers to not only have a new object notation, but an accompanying programming language as well. Though I am still working on a functioning implementation of EON, I have arrived at a fairly stable specification of what it will look like.
In EON an object is called a Card. The EON Card Model underlies not just a card's structure, but the architecture of the programming language itself because like in Lisp, code is data too. Every EON card has 3 sections: the type, the index, and the body. These are shown in the example below in green, blue, and yellow respectively.
Type | Index | Body | ||
title | { | lang:"en" | /"Harry Potter" | } |
/
.
{}
are unnecessary and may be omitted.
An example of a nested EON card is shown below in comparison to an equivalent XML object.
bookstore /[
book{ category:"cooking" /[
title{ lang:"en" /"Everyday Italian" }
author /"Giada De Laurentiis"
year /2005
price /30.00
]}
book{ category:"children" /[
title{ lang:"en" /"Harry Potter" }
author /"J K. Rowling"
year /2005
price /29.99
]}
book{ category:"web" /[
title{ lang:"en" /"Learning XML" }
author /"Erik T. Ray"
year /2003
price /39.95
]}
]
<bookstore>
<book category="cooking">
<title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
<book category="children">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<book category="web">
<title lang="en">Learning XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</bookstore>
Despite the above EON card's 1:1 correllation to the XML object, the data could be further condensed while retaining its improved legibility.
bookstore /[
book{ category:"cooking" /[
title{ lang:"en" /"Everyday Italian" }
author /"Giada De Laurentiis"
year /2005
price /30.00 ]}
book{ category:"children" /[
title{ lang:"en" /"Harry Potter" }
author /"J K. Rowling"
year /2005
price /29.99 ]}
book{ category:"web" /[
title{ lang:"en" /"Learning XML" }
author /"Erik T. Ray"
year /2003
price /39.95 ]}]