4 ms·
Element attributes are awkward to express in JSON, at the very least. Maybe if the markup language was originally designed around json it would be a more natura
by monadic2 6y ago
Element attributes are awkward to express in JSON, at the very least. Maybe if the markup language was originally designed around json it would be a more natural fit.
- throwaway894345 6y agoI think this is fine: { “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”: [ ... ] }