Examples:
In [1]: from simplejson import dumps
In [2]: dumps({1: 5, '1': 0})
Out[2]: '{"1": 0, "1": 5}'
Derp, good luck figuring out what that is supposed to mean. In [3]: dumps({None: None})
Out[3]: '{"null": null}'
In [4]: dumps({False: False})
Out[4]: '{"false": false}'
Oh snap! That's an ugly bug waiting to happen!Of course, Python is not immune from such uglyness:
In [5]: {True: 'true', 1: '1'}
Out[5]: {True: '1'}
WTF!My new favorite method of encoding data is MSGPack. It's efficient, fast, available for all popular languages, and doesn't have inherited uglyness. Disadvantages: not human readable (it's a compact binary format), and no Unicode support. The unicode support issue can be worked around by convention (for example, always encode strings as utf-8), still very annoying though.
I think we can all agree that XML is gross.
Another major issue with XML is bad programmers. XML is an interchange format, it's meant to be used when you have to give out or accept data from the 'outside'. However, it is very rare to come across industry created XML that validates. And dealing with invalid XML is a complete shitshow.