

Whats the fastest JSON C serialization library? - edsiper2


======
mh-
Check out ultrajson (aka ujson) - (also see ujson4c[1] in the same org)

as far as serializing, ujson is 7x faster than simplejson in the _worst_ cases
I've seen (disclaimer: using the Python bindings.)

[1] [https://github.com/esnme/ultrajson](https://github.com/esnme/ultrajson)

[2] [https://github.com/esnme/ujson4c](https://github.com/esnme/ujson4c) \- "A
more user friendly layer for decoding JSON in C/C++ based on [..] UltraJSON"

n.b.: There also exists a class of "simplified" JSON serializers. They
implement _most_ of the JSON specification but leave out some features (or
restrictions) that make it more expensive. I don't know anything about these,
perhaps another commenter can chime in.

------
JoachimSchipper
If you need "fastest", are you really sure you need "JSON"? JSON has a lot to
recommend it, but there are certainly _faster_ alternatives.

~~~
lsiebert
didn't google open source their in house solution? Protocol buffers? It's
late/early, so I may be misremembering, and I'm on my phone.

I wouldn't necessarily assume OP is choosing JSON over other choices. He may
be getting data from an API and need to deal with it, or using a C application
to do calculations that he then wants to display online.

