Json first-time experience --- understand what is the role of json and json, json syntax format, and json first-time experience

Source: Internet
Author: User

Json first-time experience --- understand what is the role of json and json, json syntax format, and json first-time experience

I watched a video about json today. The following are my study notes:

1. What is json?

Json is a [Special] MARK [String] written in [JavaScript syntax ].

2. Functions of json

(A) Simplified the way to define objects using JavaScript
(B) It can also be used in AJAX as one of the data carriers.

3. Functions of json syntax

(A) An object is represented {}
(B) One pair of attributes are separated by:. After the attribute ends, use, to separate the last one.
(C) An Array Using the [] symbol


The following is the html code defined in this document.

<! DOCTYPE html> 

The following is the result of the html code:

General javascript definition object ----------- 12
Wang
Nan
It is simpler to define in json format ----------- 13
Zhang
Nan
Use json to define, including arrays ----------- 14
Zhang14
Nan15
15
Zhang15
Nan15
It is defined in json format. The object attributes contain arrays ----------- Guangzhou
Zhongshan
Foshan
Shenzhen
It is defined in json format. attributes of an object include arrays, and attributes ----------- ID: 16 exist in the array object.
Name: tai
Salary: 6000
You have visited the following cities:
Guangzhou
Changsha
It is defined in json format. The object attributes contain internal functions (the function is an unknown function )-----------



Which of the following is a practical example of json?

JSON, the full name is JavaScript Object Notation. It is a lightweight data exchange format based on the JavaScript programming language ECMA-262 3rd Edition-December 1999 standard, mainly used to exchange data with the server. Similar to XML, it is independent of languages and has great advantages in cross-platform data transmission.
The above is an encyclopedia explanation, which can explain the meaning and function of json. json is actually a key-value pair for storing data. For example:
Var a = {"one": "one", "two": "two", "three": "three"}, a is a json,. the value of one is one, and an array can be embedded.
Var B = {"A": "[1, 3, 4, 5, 6, 7]", "B": "[a, B, c, d, e]"}, b. the value of A [0] is 1. json variables can also be embedded with json, and arrays can be embedded. The value method is the same as above. The array uses subscript and json to take the name of the key-value pair, easy to use, simple data storage format

Json format. Can I see if this is json format?

This JSON outer layer is missing {}, so it is incorrect.

It should be

{
"Job ":[
{"Title": "", "date": "February 26 14:04:54", "val ":[
{"Ispicture": "False", "content": "2 instant phase" },{ "ispicture": "True", "content": "aa.jpg "},
{"Ispicture": "False", "content": "Not all attachments are opened "},
{"Ispicture": "True", "content": "cc.jpg" },{ "ispicture": "False", "content": "Dr. fenshita "},
{"Ispicture": "False", "content": "Shandong is so cheap"}]
}]
}

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.