What is JSON

Source: Internet
Author: User

JSON is a kind of text-based data exchange method

The advantages of JSON:

1, based on plain text, cross-platform transmission is extremely simple;

2, JavaScript native support, background language almost all support;

3, lightweight data format, occupies very few characters, especially suitable for internet transmission;

4, readability is strong, although less than the XML so at a glance, but in a reasonable order after indentation is easy to identify;

5, easy to write and analysis, of course, if you want to know the data structure;

The format or rule of JSON:

JSON can describe a data structure in a very simple way, and XML can do it all, so it's completely pitches in cross-platform terms.

1. JSON has only two data type descriptors, curly braces {} and square brackets [], the remaining English colons: is the map, comma, is the delimiter, the English double quotation mark "" is the definition.

2, curly braces {} are used to describe a set of "different types of unordered key-value pairs" (each key-value pair can be interpreted as an attribute description of OOP), and square brackets [] are used to describe a set of "ordered sets of data of the same type" (which corresponds to an array of OOP).

3, if there are more than one of the two sets of children, it is separated by commas.

4. The key value pairs are separated by a colon: and the key name is suggested with the English double quotation mark "" to facilitate the parsing of different languages.

5, JSON internal common data types have string, number, Boolean, date, NULL, the string must be enclosed in double quotation marks, the rest are not used, the date type is more special.

What is JSON

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.