admin管理员组文章数量:1304960
Just a quick question (it's marked as a munity wiki)
From experiences, have you found it easier to evaluate your ajax responses using XML or JSON when using ExtJS? Which format is ExtJs better for handling?
I'm torn between them.
Thanks!
Just a quick question (it's marked as a munity wiki)
From experiences, have you found it easier to evaluate your ajax responses using XML or JSON when using ExtJS? Which format is ExtJs better for handling?
I'm torn between them.
Thanks!
Share Improve this question asked May 28, 2010 at 14:40 munity wikiFlukey 1
- SO and polls don't mix so well, but I'd vote JSON and it's not even close. – annakata Commented May 28, 2010 at 15:15
4 Answers
Reset to default 9According to the ExtJS team, JSON is easier and faster to use.
In my former job, we tried both and definitely had better performance with JSON.
JSON, since javascript can handle this natively you don't have to use any extra libs etc for parsing it.
JSON is definitely the way to go if you can produce it efficiently on the server-side (which usually isn't a problem for most languages).
If you are dealing with big datasets and need to find data within that set quick and easy, XML would probably be faster because it would parse it natively, and using native xpath-support it would probably find your data blazing fast.
Using JSON in those cases would require an eval on the data, and most json-parsers also validates a lot of the code for security reasons etc meaning that it wont be exclusively "native" code that processes it.
That will make a huge impact on the total processing time which would be a lot of overhead if you would only use a small sample in the data.
Both techniques has pros and cons, so it's more dependent on the actual case it will be used in.
本文标签: javascriptExtJSDo you find it easier to work with JSON or XML responsesStack Overflow
版权声明:本文标题:javascript - ExtJS - Do you find it easier to work with JSON or XML responses? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741796066a2397947.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论