JSON Basic Learning

Source: Internet
Author: User

Defined

JSON-Lightweight Text data Interchange Format, language independent, smaller and faster and easier to parse than XML

JSON parser and JSON library support for different programming languages

4 Basic Rules

1. Use commas between the parallel data,

2. The map is represented by a colon

3. Parallel data sets (arrays) are denoted by square brackets []

4. The mapped collection (object) is represented by curly braces {}

For example, Beijing area 16800 square kilometers population 16 million people Shanghai area 6400 square kilometers, population 18 million people

[City: Beijing, Area: 16800, Population: 1600},{City: Shanghai, Area: 6400, population: 1800}]

Advantages

1 simple, small 2. Multi-lingual support

Disadvantages

The character set must be Unicode

Using JSON in Python

function Program Library
Encode Encodes a Python object as a JSON string representation.
Decode Decodes a JSON-encoded string into a Python object.

JSON Basic Learning

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.