Five Elements of JSON Syntax: graphic introduction _ basic knowledge

Source: Internet
Author: User
Tags php database
JSON syntax is a lightweight data exchange format, which is easy to read and write. This article will introduce in detail. For details, refer to JSON syntax, which is a lightweight data exchange format. Easy to read and write. At the same time, it is easy to parse and generate machines. I hope this article will teach you more things.

JSON Syntax Development includes: Easier design and integration, expanded deployment options, more diverse login and personalized services, and better data access and synchronization. You can also use json_encode () makes the data connected from the PHP database available for Ajax applications.

JSON syntax

The JSON syntax is simple, that is, braces '{}', braces '[]', comma ',', colons ':', and double quotation marks '. Data Type: Nested object, array, String, number, Boolean value, or null value.

1) The object is an unordered set of 'name/value' pairs. An object starts with "{" (left parenthesis) and ends with "}" (right Parenthesis. Each "name" is followed by a ":" (colon); "," (comma) is used to separate the "name/value" pairs.

498) this. style. width = 498; "border = 0>

2) An array is an ordered set of values. An array starts with "[" (left square brackets) and ends with "]" (right square brackets. Values are separated by commas.

498) this. style. width = 498; "border = 0>

3) JSON syntax can be string, number, true, false, null, object, or array enclosed by double quotation marks ). These structures can be nested.

498) this. style. width = 498; "border = 0>

4) A string is a collection of any number of Unicode characters enclosed by double quotation marks. It is escaped using a backslash. A character (character) is a separate string (character string ). A string is very similar to a C or Java string.

498) this. style. width = 498; "border = 0>

5) The JSON syntax is very similar to the values in C or Java. Remove unused octal and hexadecimal formats. Except for some encoding details.

498) this. style. width = 498; "border = 0>

Related Article

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.