sanand0 / xmljson

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

Update __init__.py #30

Closed jorndoe closed 5 years ago

jorndoe commented 6 years ago

None becomes "None" in the Parker implementation.

Not good: <empty/>{"empty": null}<empty>None</empty>

Better: <empty/>{"empty": null}<empty></empty>

dagwieers commented 6 years ago

This PR also requires updates to the integration tests to make them work again.

sanand0 commented 5 years ago

@jorndoe -- sorry for reverting quite late.

The Parker convention REQUIRES that empty elements must become null.

image

I've instead modified it so that the null is translated back to an empty string.

So <empty/>{"empty": null}<empty></empty>.

Thankks for raising this.