3 ms·
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> <b
by gambler 7y ago
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 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?
- m1el 7y ago> 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? Because the OP article doesn't even consider s-expressions, so I'm working with the tools I was given. Personally, I find it frustrating that EDN (or some other form of s-exprs) aren't widely adopted.
- otabdeveloper4 7y agoNot specified enough, I think you mean: <ieee-754:byte xstdversion="2008" nstid="two's complement" _archext="x86-64"> <ieee-754:bit arity="2">1</ieee-754:bit> <ieee-754:bit arity="2">0</ieee-754:bit> ...