开发者

Serializing and deserializing data - JavaScript

开发者 https://www.devze.com 2022-12-26 16:57 出处:网络
I need to perform a lot of serializing and de-serializing in an application. The data is POST parameters and Cookie headers.

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

精彩评论

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