Pregunta

If all I wanted to do with a webserver was to request data and send commands from an iPhone app, all I'd need for that is AFJSONRequestOperation, correct? Why are some people also using JSONKit with AFNetworking? If I use JSONKit then do I still need to use AFNetworking?

¿Fue útil?

Solución

You need a JSON parsing library (like JSONKit) if you are deploying to < iOS 5.

AFNetworking does all the networking stuff JSONKit does the parsing/encoding of JSON on < iOS 5

From AFNetworking git

AFNetworking requires either iOS 4.0 and above, or Mac OS 10.6 and above.

AFNetworking uses NSJSONSerialization if it is available. If your app targets a platform where this class is not available you can include one of the following JSON libraries to your project for AFNetworking to automatically detect and use.

  • JSONKit
  • SBJson
  • YAJL
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top