By now I shouldn't be, but I'm always a little surprised when people come to the conclusion that the best way to represent HTML is JSON or Javascript (or anything but HTML).
{
“type”: “div”,
“style”: “...”,
“children”: [ ... ]
}
If you really want to treat attributes specially you could put them under an “attributes” key: {
“type”: “div”,
“attributes”: {“style”: “...”},
“children”: [ ... ]
}Therefore I think it's very understandable why people come to that conclusion so often.