This reminds me of an old joke about binary XML:
<byte>
<bit>1</bit> <bit>1</bit> <bit>0</bit> <bit>1</bit>
<bit>0</bit> <bit>1</bit> <bit>1</bit> <bit>0</bit>
</byte>
>It's easy to make a concise representation of DOM trees as JSON: http://m1el.github.io/jsonht.htm
It is not concise. Here is an example of a single div tag overhead:
["div",{"class":"some classes"}, ... ]
<div class="some classes"> ... </div>
Also, it does not represent DOM trees as JSON. It represents DOM trees as S-Exressions encoded via JSON. The s-expression above can be written directly as:(div (class= "some classes") ... )
So why does it need to be wrapped in a format that's verbose, underspecified, doesn't have comments, doesn't have namespaces and doesn't have any notion of metadata?