开发者

Serialize vs. Json

Now i am creating Ajax app开发者_StackOverflow and i want to know what is better to connect server data with client.

Last time i used json but some time ago i hear that serialized data is faster.

Who know what is better?


In general, a serialized binary representation will be smaller than a JSON representation of the same object (that in turn would be smaller than an XML representation).

In this regards, network transfers would be faster.


Probably you're comparing serialize (working similarly in PHP) and json on your client (a browser). There's a serialize function (similar to how PHP works) in jquery but no native unserialize. I suggest you work with json when communication is between your server and your client (ajax).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜