gpt4 book ai didi

iphone - 在 iPhone 应用程序 : XML or JSON? 中使用哪个更快/更容易

转载 作者:数据小太阳 更新时间:2023-10-29 02:15:16 27 4
gpt4 key购买 nike

我开始创建一个将与公共(public) API 交互的 iPhone 应用程序。

我的问题是,使用 XML 还是 JSON 哪个更快和/或更容易?

最佳答案

根据 Sam Soffes , TouchJSON 优于 XML 属性列表:

When I was preparing for my talk I decided to do some benchmarks to show how much more awesome plists were than JSON. The plist version was about 8 times faster than my JSON Framework version. I was pretty happy with that result. My friend, Jake, said he was using TouchJSON to parse JSON in his apps, so I figured I’d go ahead and benchmark that one too. I was expecting JSON Framework to beat it because the interface to the JSON Framework is a lot simpler than the interface to TouchJSON.

What I found was very surprising. TouchJSON actually beat plists. It was slightly faster in every test I ran. This is awesome because plists have a much larger file size. They are usually about twice as big as JSON files due to all of the extra markup.

但是,这是单个数据点。

关于iphone - 在 iPhone 应用程序 : XML or JSON? 中使用哪个更快/更容易,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1992947/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com