JSON or SOAP (XML)?

后端 未结 7 1385
清歌不尽
清歌不尽 2020-12-04 19:05

I\'m developing a new application for the company. The application have to exchange data from and to iPhone.

Company server side uses .NET framework.

For ex

7条回答
  •  悲&欢浪女
    2020-12-04 19:59

    I would certainly go with JSON, as others already noted - it's faster and data size is smaller. You can also use a data modelling framework like JSONModel to validate the JSON structure, and to autoconvert JSON objects to Obj-C objects.

    JSONModel also includes classes for networking and working with APIs - also includes json rpc methods.

    Have a look at these links:

    • http://www.jsonmodel.com - the JSONModel framework
    • http://json-rpc.org - specification for JSON APIs implementation
    • http://www.charlesproxy.com - the best tool to debug JSON APIs
    • http://json-schema.org - tool to define validation schemas for JSON, useful along the way

    Short example of using JSONModel: http://www.touch-code-magazine.com/how-to-make-a-youtube-app-using-mgbox-and-jsonmodel/

    Hope these are useful

提交回复
热议问题