JSON knowledge
The object representation of the JSON (JavaScript object notataion) JavaScript, but has now evolved into a lightweight form of data interaction.
Features: completely independent of the language of the text format, cross-platform, structured, convenient for people and machines to parse.
Usage Scenarios
1. data transfer between different languages (json is string, but it is formatted),
Front desk Javascript background Java attention is not a language, the background after querying the database, to pass data to the foreground, the data will be converted to list, set, map to the front end. But JS does not recognize. So the data in the background is converted to JSON and the foreground can be parsed. Background list---->json then the front desk can parse.
2.SSH----->easyui| extjs| Ajax|
The difference between JSON and XML, properties:
1) Josn is lightweight, and XML is heavyweight (Web. xml), which is typically used for framework configuration.
2) JOSN is structured, but properties are just key value (JSON can be used to pass objects.)
3. Self-understanding
since all of the data is exchanged in JSON, why do you want to convert to the front end to the object, just to point the properties to use it?
Json does not convert to objects there is no way to get what you want, then a bunch.
Can you transfer objects directly?
If the transitive object needs to be serialized, the receiving object needs to be deserialized and more cumbersome.
Cross-platform understanding?
How Java objects give JS needs to be made into a format that everyone knows.
Java objects only Java knowledge, JS object only JS know, but JSON is
Both JAVA and JS recognize that only the two languages you know can interact with each other.
the 4.JSON has these forms:
Object (Object) is an unordered"'name/value'the"collection. An object to"{"(opening parenthesis),"}"(closing parenthesis) ends. Each"name"followed by a":"(colon);"'name/value'the"Used between","(comma) delimited.
Array ( Array ) is anordered collection of values (value). An array begins with "["(the left square bracket), and"]"(the right square bracket) ends. Use ","(comma) to separate values.
VALUES ( value ) can be a string enclosed in double quotation marks (string), a numeric value (number ), True,false, null, Object,or array. These structures can be nested.
A deep understanding of JSON