sanand0 / xmljson

xmlsjon converts XML into Python dictionary structures (trees, like in JSON) and vice-versa.
MIT License
122 stars 33 forks source link

fix missing root element in parker conversion #13

Closed stfuchs closed 7 years ago

stfuchs commented 7 years ago

For the parker conversion the root element is ignored. Is this intentional?

sanand0 commented 7 years ago

@stfuchs According to this MDN article the root element is absorbed. That's the design I followed.

But according to this document it isn't.

Is there any authoritative reference to the Parker convention that is still around? Also, could you explain the reason behind choosing the Parker convention? That would help me with the right choice.

stfuchs commented 7 years ago

Ah I see, did not know the convention is unclear on this. To be honest I chose Parker because I don't have xml attributes and it provided the cleanest json in my case. If you want to stick with the convention that absorbs the root element, that's fine with me. A small hint in the readme might be useful though.

dagwieers commented 7 years ago

Maybe it should become optional then.