Agreed, especially about simplejson. I work on a project that uses simplejson, and it leads to ugly type checking all over the place because you never know what your JSON string got turned into. For example:
https://github.com/openstack/swift/blob/39c1362a4f5a7df75730...
and https://github.com/openstack/swift/blob/39c1362a4f5a7df75730...
and https://github.com/openstack/swift/blob/39c1362a4f5a7df75730...
and many more just like those.
The worst part is the bugs that appear or disappear depending on whether simplejson's speedups module is in use or not.
Re:Json vs. simplejson vs. ujson
by TazeTSchnitzel on Monday April 06, 2015 @12:05PM
(#9328813)
There are so many poorly-written JSON decoders out there. I've had the misfortune of fixing two of PHP's to follow JSON's case-sensitivity and whitspace rules properly.
cjson's way of handling unicode is just plain wrong: it uses utf-8 bytes as unicode code points. ujson cannot handle large numbers (somewhat larger than 263, i've seen a service that encodes unsigned 64-bit hash values in JSON this way: ujson fails to parse its payloads). With simplejson (when using speedups module), string's type depends on its value, i.e. it decodes strings as 'str' type if their characters are ascii-only, but as 'unicode' otherwise; strangely enough, it always decodes strings as unicode (like standard json module) when speedups are disables.