|
|
|
|
|
by borman
4093 days ago
|
|
The problem with all (widely known) the non-standard JSON packages is, they all have their gotchas. 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. |
|
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.