Jquery. json plugin for ease of use

Source: Internet
Author: User
Tags control characters convert json to string tojson

Important: 2.0 is not backward compatible with previous versions

This plug-in can easily perform json operations,

Var thing = {plugin: 'jquery-json', version: 2.4}; var encoded = $. toJSON (thing); // '{"plugin": "jquery-json", "version": 2.4}' var name = $. evalJSON (encoded ). plugin; // "jquery-json" var version = $. evalJSON (encoded ). version; // 2.4


ToJSON: Serialized JavaScript Object, number, string or array to JSON object EvalJSON: Convert from JSON to Javascript Object (convert json to string) SecureEvalJSON: Converts from JSON to Javascript, but does so while checking to see if the source is actually JSON, and not with other Javascript statements thrown in. QuoteString: Places quotes around a string, and intelligently escapes any quote, backslash, or control characters. quoteString: a string that is placed in quotation marks and intelligently defines any quotation marks, backslash, or control characters. SecureEvalJSON: Convert from JSON to Javascript, but check at the same time to see if the source is actually JSON, rather than throwing an inch with other JavaScript statements.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.