Is NSJSONSerialization more error-tolerant and robust than JSONKit?

1.7k views Asked by At

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?

1

There are 1 answers

0
Jeff Wolski On BEST ANSWER

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.