哪个在JavaScript,JSON或SOAP解析方面更快? [英] Which is faster in JavaScript, JSON or SOAP parsing?

查看:88
本文介绍了哪个在JavaScript,JSON或SOAP解析方面更快?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是两种情况。


  1. 我们正在使用xmlhttprequest手动构建的xml soap请求,将其发送到wcf soap服务,获取响应和使用xPath解析数据并填写下拉列表。

  1. We are using a manually built xml soap request with xmlhttprequest, sending it to a wcf soap service, getting back the response and using xPath to parse the data and fill out a drop down list.

我们正在向休息的wcf服务发送一个json请求,并返回一个json响应并将值分配给下拉列表

We are sending a json request to a rest wcf service and getting a json response back and assigning the values to a drop down list

哪种情况更快?我的感觉告诉我#2但我可能错了。

Which scenario is faster? My sense tells me #2 but I could be wrong.

推荐答案

在我的方案中进行性能分析后,我发现JSON实际上在浏览器中处理时间要快得多

After profiling in my scenario, I found out that JSON is actually much faster as far as processing time within the browser

这篇关于哪个在JavaScript,JSON或SOAP解析方面更快?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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