gowalla/AFNetworking — pull request #106 by steipete (2011-11-09 20:04:38+00:00)
Title: JSON detection

Hi Mattt,

I've seen that you used my NSInvocation-approach to dynamically link a JSON-parser, great!

I added defines in 1a30c417 so that if an application is built with a minimal target of iOS5 or OS X 10.7, NSJSONSerializion is used automatically, without any NSInvocation clutter. This is both faster and cleaner - and some day, we may be able to delete the #else branch of this conditional completely. (code deletion, whohoo!)

When I wrote the original code in 2010, NSJSONSerializer was not yet available at all.
As this is now the preferred way to parse JSON, JSONKit will be obsolete for most future apps.
(I *really* admire John Engelhart and it's the fastest parser out there, but I'm also sure Apple will further tweak performance here - and code that's managed by Apple is much less lightly to break in new OS updates; I just want to remember the fiasco with JSONKit and early 10.7: https://github.com/johnezang/JSONKit/issues/15)

I also would add NSJSONSerialization as #1, but I can understand that people who still need to support iOS 4.0 or 10.6 want a _consistent_ parsing experience, no parser works 100% the same, so we may leave that for now.