|
|
|
|
|
by ingenter
4491 days ago
|
|
One can make a 1:1 mapping from XML to JSON, but it is going to be verbose. {
'tag': 'Foo',
'children': [
'Some text',
{
'tag': 'Bar',
'children': ['more text']
}
]
}
or (hello, LISP) ['Foo', ['Some text', ['Bar', ['more text']]]]
|
|
Also, side observation, that Lisp-like encoding is pretty icky as-is (deciding if something is a tag or text by how deep the array is?), and gets worse if the XML uses attributes.