Serialize JavaScript. Serialize JavaScript to a superset of JSON that includes regular expressions, dates and functions. The code in this package began its life as an internal module to express-state. To expand its usefulness, it now lives as serialize-javascript — an independent package on npm. Converting a JSON Text to a JavaScript Object. A common use of JSON is to read data from a web server, and display the data in a web page. For simplicity, this can be demonstrated using a string as input. First, create a JavaScript string containing JSON syntax.
I am using to a jQuery post method to send some data to a server. Rather than constructing the JSON string myself, I would like to simply use a Javascript object. When I get the return string (in JSON) I would like to automatically construct a corresponding javascript object. Is this possible?