[英]Protobuf vs JSON - Objective-C/iOS
In Objective-C, making iOS apps, what is the best way to go regarding serialization? 在Objective-C中,制作iOS应用程序,关于序列化的最佳方法是什么? Protobuf or JSON?
Protobuf或JSON?
Protobuf is more time- and space-efficient, JSON is probably more nerve-efficient. Protobuf更节省时间和空间,JSON可能更具神经效率。 As long as there is no reason for the former two (eg because the amount of data to be serialized is small and serialization is not time-critical), I would stick to JSON.
只要前两者没有理由(例如因为要序列化的数据量很小而且序列化不是时间关键的),我会坚持使用JSON。
This also makes debugging more fun :-) 这也使调试更有趣:-)
I don't know Protobuf, but JSONKit is a very good choice on iOS. 我不知道Protobuf,但JSONKit在iOS上是一个非常好的选择。 See JSON vs. PLIST, the Ultimate Showdown for a performance comparison.
有关性能比较,请参阅JSON vs. PLIST,Ultimate Showdown 。 JSONKit is widely used and actively developed which makes it a solid choice.
JSONKit被广泛使用并积极开发,使其成为一个可靠的选择。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.