The eval () function provided by Javascript can convert json data into Javascript objects. However, Javascript objects are not serialized as functions in json format. [Javascript] var json = '{"name": "John"}'; var obj = eval ('+ json +'); alert (obj. name); $. parseJSON (json) is used to convert json into Javascript objects, but does not provide a function to convert Javascript objects into json. [Javascript] var json = {"name": "John"}; var obj = $. parseJSON (json); alert (obj. name); what if we want to convert the Javascript Object into json and send it to the server? It is actually very simple. You can use the jquery. json plug-in. The current version is as follows: jquery. json-2.4.js (compressed version: jquery. json-2.4.min.js) the plug-in provides four functions for parsing and anti-parsing json, specifically: • toJSON: converts javascript object, number, string, or array into JSON data. • EvalJSON: converts JSON-format data into Javascript objects at a very fast speed, but this speed is negligible (as mentioned by the author ). • SecureEvalJSON: converts JSON to a Javascript Object, but checks whether the converted data is in JSON format before conversion. • QuoteString: Add quotation marks at both ends of the string and intelligently escape (skip) any quotation marks, backslash, or control characters. Example (Be sure to use it with the jQuery core library): [javascript] var json = {plugin: 'jquery-json', version: 2.4 }; // '{"plugin": "jquery-json", "version": 2.4}' var encoded = $. toJSON (json); // get the name value: "jquery-json" var name = $. evalJSON (encoded ). plugin; // The value of version is 2.4 var version = $. evalJSON (encoded ). version;