Question

Although according to benchmarks JSONKit is faster, the Github readme is full of warnings that illformed JSON leads to crashes, etc.

For me it is more important that there is no crash, and that an ilformed Unicode JSON or other subtle error in the JSON file does not cause a crash.

Maybe the speed increase comes from it's strictness and unforgivingness towards errors? Is NSJSONSerialization more robust in this regard?

Was it helpful?

Solution

This is a somewhat subjective question in that it can only be answered in terms of the experiences of myself and other developers.

I have used both JSONKit and NSJSONSerialization and greatly prefer the latter. Irrespective of what the benchmarks indicate, I have not noticed a difference in speed in everyday use. However, I am also in the habit of doing my deserialization in a background thread, so the speed differences may not be apparent in the UI.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top