JSON is a data structure that replaces XML, which is smaller and less descriptive than XML, and because of its compactness, the network transmits data to reduce traffic and speed up.
So, what exactly is JSON?
JSON is a string of strings except that the elements are labeled with a particular symbol.
{} Double brackets represent objects
[] brackets represent the array
"" In double quotes is a property or value
: A colon indicates that the latter is a value (the value can be a string, a number, or another array or object)
so {"name": "Michael"} can be understood as an object containing the name Michael
and [{"Name": "Michael"},{"name": "Jerry"}] represents an array containing two objects
of course, you can also use {"Name": ["Michael", "Jerry"]} to simplify the above, which is an object with a name array
PS: There are still a lot of people there are some misunderstanding, why {name: ' JSON '} in the test can not pass,
that's because the latest specification of the JSON official website
if it is a string, it is best to enclose the key or value in double quotation marks, so the above code is {"Name": "JSON"}
do not refute, the official website is so defined.
Pro, do you use double quotes for your JSON key-value pairs?