sanand0 / xmljson

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

None becomes "None" #29

Closed jorndoe closed 5 years ago

jorndoe commented 6 years ago

https://github.com/sanand0/xmljson/blob/93011b14d1536e01283668e377684eef0a2da279/xmljson/__init__.py#L182

This line should be:

            if root.text is None:
                return ''
            else:
                return self._fromstring(root.text)

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

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

dagwieers commented 6 years ago

@jorndoe Can you make a PR ?

PS You don't need any Git skills, you can simply edit this file on GitHub and make the required change. Then it will make a PR from it.

jorndoe commented 6 years ago

@dagwieers Hereby done PR #30

sanand0 commented 5 years ago

Closed via 824e39b