哪个序列化更快,并在wcf和Windows Phone中使用? [英] which serialization is faster and used in wcf and windows phone?

查看:80
本文介绍了哪个序列化更快,并在wcf和Windows Phone中使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

哪个序列化更快更好,我们是否必须通过序列化将数据从wcf发送到Windows Phone?

1.xml

2.json

哪个更好?

which serialization is faster and better and whether we have to send data from wcf to windows phone only through serialization ?
1.xml
2.json
which is better ?

推荐答案

json 相比是轻量级的xml ,所以它比 XML更快



JSON比XML好吗? [ ^ ]



JSON或XML:Just Decide [ ^ ]
json is lightweight compared to xml, so it is more faster than XML

Is JSON better than XML?[^]

JSON or XML: Just Decide[^]


json更快。



速度的唯一主要区别就是解析时间,这真的取决于whic h您使用的库和基础设施。我的直觉是JSON的解析速度会更快,但可能会有更成熟的XML解析器,所以它很可能会被折腾。如果真的那么重要,我建议你写一些性能测试,以确定哪种工作在你的环境中更快。

删除一些支持JSON的XML格式的响应。如果您计划在任何时候使用Streaming API,我建议切换到JSON,因为那里不支持XML。



如需进一步参考,请阅读..

https://www.udemy.com/blog/json-vs-xml/ [ ^ ]
json is faster.

The only major difference in speed would be parsing time, and that's really dependent on which library and infrastructure you use. My gut feeling is that JSON will be faster to parse, but there are probably more mature XML parsers out there, so it's likely a toss up. If it really matters that much, I'd suggest writing a few performance tests to determine which works faster in your environment.
Some XML formatted responses in favor of JSON are removed. If you plan on using the Streaming API at any point, I'd suggest making the switch to JSON, since XML is not supported there.

For further reference read..
https://www.udemy.com/blog/json-vs-xml/[^]


这篇关于哪个序列化更快,并在wcf和Windows Phone中使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆