Live data from Hacker News

Json vs. simplejson vs. ujson

jyotiska.github.io

41–50 of 75 posts

Re: Json vs. simplejson vs. ujson

#41
I know it goes against the grain, but I wish that binary json (UBJSON) had much more widespread usage. There's no reason tools can't convert it back to json for us old humans.

The speed deference between working with binary streams and parsing text is night and day.

Re: Json vs. simplejson vs. ujson

#42

I know it goes against the grain, but I wish that binary json (UBJSON) had much more widespread usage. There's no reason tools can't convert it back to json for us old humans. The speed deference between working with binary streams and parsing text is night and day.

No it's not.

http://hperadin.github.io/jvm-serializers-report/report.html

Re: Json vs. simplejson vs. ujson

#44
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.

Re: Json vs. simplejson vs. ujson

#45

I just want to add another library in here which – at least in my world – is replacing json as the number one configuration and serialisation format. It's called libucl and it's main consumer is probably the new package tool in FreeBSD: `pkg` Its syntax is nginx-like but can also parse strict json. It's pretty fast too. More info here: https://github.com/vstakhov/libucl

Out of curiousity, what do you mean by "my world"? Is this a particular domain you're working in, or just your personal usage?

Was just referring to the set of tools and libraries I surround myself with.

Re: Json vs. simplejson vs. ujson

#46

I just want to add another library in here which – at least in my world – is replacing json as the number one configuration and serialisation format. It's called libucl and it's main consumer is probably the new package tool in FreeBSD: `pkg` Its syntax is nginx-like but can also parse strict json. It's pretty fast too. More info here: https://github.com/vstakhov/libucl

Out of curiousity, what do you mean by "my world"? Is this a particular domain you're working in, or just your personal usage?

He is obviously an alien and he is trying to introduce the tools he use in his home world.

OnTopic: I think is an unusual way of saying "the environment I use"

Re: Json vs. simplejson vs. ujson

#47

I just want to add another library in here which – at least in my world – is replacing json as the number one configuration and serialisation format. It's called libucl and it's main consumer is probably the new package tool in FreeBSD: `pkg` Its syntax is nginx-like but can also parse strict json. It's pretty fast too. More info here: https://github.com/vstakhov/libucl

Any particular reason to use this over YAML for configuration?
Post reply on HN