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

公司服务器端使用.NET框架.

For example: the class "Customer" (Name, Address etc..) for a specific CustomerNumber should be first downloaded from server to iphone, stored locally and then uploaded back to apply changes (and make them available to other people). Concurrency should not be a problem (at least at this time...)

无论如何,我必须同时开发服务器端(webservice或其他)和iPhone应用程序.

I'm free to identify the best way to do that (this is the application "number ONE" so it will become the "standard" for the future).

那么,你有什么建议?

使用SOAP web服务(XML解析等)还是用户JSON?(看起来更轻了……)

应用程序需要使用日期值(例如:上次访问日期等)Json中的日期呢?

推荐答案

与XML相比,JSON有几个优点.它体积小得多,体积也小得多,所以通过网络传输的数据会少得多——对于移动设备来说,这会产生很大的影响.

Its also easier to use in javascript code as you can simply pass the data packet directly into a javascript array without any parsing, extracting and converting, so it is much less CPU intensive too.

To code with it, instead of an XML library, you will want a JSON library. Dates are handled as you would with XML - encode them to a standard, then let the library recognise them. (eg here's a library with a sample with dates in it)

Here's a primer

Json相关问答推荐

JSON字符串处理注入引号

我可以使用JQ来缩小数组中的json对象的范围吗?

如何在数组抖动中按值分组

写入JSON文件的流

从Postgres表中的JSON中提取值

重构JOLT代码以获得预期输出

无法访问id的第三级json

简单条形图和有序分类中条形图的 colored颜色 梯度

jq可以在两个JSON对象列表中依次添加对象吗?

我需要在 mongodb compass 中检索索引(编号 1)信息

shell解析json并循环输出组合变量

将文本转换为 python 列表

TSQL FOR JSON 嵌套值

Servicestack 返回数组而不是带有数组的对象

可以通过 POST 使用 EventSource 传递参数的服务器发送事件 (SSE)

在视图中将 .Net 对象转换为 JSON 对象

Sequelize - 如何仅返回数据库结果的 JSON 对象?

Spring restTemplate 获取原始 json 字符串

POST:在 url 本身中发送 post 请求

AJAX 将 JavaScript 字符串数组发布到 JsonResult 作为 List 总是返回 Null?