开发者

Serializing and deserializing data - JavaScript

I need to perform a lot of serializing and de-serializing in an application.

The data is POST parameters and Cookie headers.


Post data example:

Name=Jonathan+Doe&Age=23&Formula=a+%2B+b+%3D%3D+13%25%21

Set-Cookie data example:

ASP.NET_Sessi开发者_StackOverflow社区onId=esur3bqqgrmnci45um4xegye; path=/


Does anyone have any fast libraries to suggest or efficient ways to perform these operations?


Consider using a JSON stringify method:

http://zumbrunn.com/mochazone/JSON.stringify+and+JSON.parse/

JSON is a fairly universal serialization format that you can parse in ASP.Net. Basically it converts a JS object into a string of text that represents the object itself (as if you were to type the object declaration out literally).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜