Json vs. simplejson vs. ujson
jyotiska.github.io
Json vs. simplejson vs. ujson
1–10 of 75 posts
Re: Json vs. simplejson vs. ujson
#2Re: Json vs. simplejson vs. ujson
#3Re: Json vs. simplejson vs. ujson
#4Well-defined collections? As in, serializable? Well sure, that's requisite for the native json package as well as simplejson (as far as I can recall -- haven't used simplejson in some time.)
But does "texts" refer to strings? As in, only one data type? The source code certainly supports other types, so I wonder what this statement refers to.
Re: Json vs. simplejson vs. ujson
#5The usage of percentages in the article is wrong. 6 is not 150% faster than 4.
Re: Json vs. simplejson vs. ujson
#6JSON is a data representation, not a data model.
Re: Json vs. simplejson vs. ujson
#7However, after swapping a fairly large and json-intensive production spider over to ujson, we noticed a large increase in memory use.
When I investigated, I discovered that simplejson reused allocated string objects, so when parsing/loading you basically got string compression for repeated string keys.
The effects were pretty large for our dataset, which was all API results from various popular websites and featured lots of lists of things with repeating keys; on a lot of large documents, the loaded mem object was sometimes 100M for ujson and 50M for simplejson. We ended up switching back because of this.
Re: Json vs. simplejson vs. ujson
#8Re: Json vs. simplejson vs. ujson
#9The usage of percentages in the article is wrong. 6 is not 150% faster than 4.