{"issue":{"title":"Should check for NSJSON first, since it's the default iOS JSON library","user":{"login":"shanev","id":17361,"url":"https://api.github.com/users/shanev","avatar_url":"https://secure.gravatar.com/avatar/363548d0cfaaa4bab88747f31ad49c02?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"363548d0cfaaa4bab88747f31ad49c02"},"created_at":"2011-12-16T23:08:35Z","milestone":null,"state":"open","updated_at":"2011-12-29T02:07:05Z","labels":[],"id":2585673,"closed_at":null,"html_url":"https://github.com/AFNetworking/AFNetworking/issues/153","pull_request":{"patch_url":"https://github.com/AFNetworking/AFNetworking/pull/153.patch","html_url":"https://github.com/AFNetworking/AFNetworking/pull/153","diff_url":"https://github.com/AFNetworking/AFNetworking/pull/153.diff"},"body":"When encoding and decoding JSON, we should check to see if NSJSONSerialization exists first since it's the default JSON library from iOS 5 and onwards. This will ensure that AFNetworking won't be effected by bugs in third party libraries, or bugs such as bug #152.","number":153,"url":"https://api.github.com/repos/AFNetworking/AFNetworking/issues/153","comments":10,"assignee":null},"comment":{"user":{"login":"zbowling","id":245886,"url":"https://api.github.com/users/zbowling","avatar_url":"https://secure.gravatar.com/avatar/ba78b57d00a1ed5c2dd21c1feba778d6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"ba78b57d00a1ed5c2dd21c1feba778d6"},"created_at":"2011-12-29T02:07:05Z","updated_at":"2011-12-29T02:07:05Z","id":3297394,"body":"Explicit for your app is always better across all versions of iOS. Changing behavior because of your environment is just asking for bugs. There are plenty of subtle differences in the output of all these JSON libraries like how they handle NSNulls, numbers bigger than what can be stored in float (since javascript treats all numbers as floats so they only have precision up to 52 bits), and cross domain guard functions. \r\n\r\nI documented this over the evolution towards the current behavior after a lot of debate across several bugs and pull requests. \r\n\r\nJSONKit is the fastest decoder and encoder (much faster than Apple's) but it's another dependency that I may not want to add to my project. I don't really need a high speed decoder and only targeting iOS 5+ so NSJSONSeralization is fine for me.\r\n\r\nThe current implementation isolates all JSON decoding and encoding to a single file so it's easy to drop in your own solution but by default, it tries its best to do the write thing most of the time. \r\n\r\nOn ARC however, take a look at the SeatMe fork. Our version of AFNetworking grew a bit different over time. Everything feature we could send pull requests for are in feature branches. We recently decided to convert everything to ARC though because it helped solve several our bugs with retain cycles around NSURLConnection and blocks retaining self. It's a good, well tested implementation if you are looking for an ARC fork. \r\n\r\n \r\n","url":"https://api.github.com/repos/AFNetworking/AFNetworking/issues/comments/3297394"},"action":"created"}