《小红书 第20章》web
JSON (JavaScript Object Notation) is most widely used data format for data interchange on the web. This data interchange can happen between two computers applications at different geographical locations or running within same hardware machine.编程
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate.json
`借用JS语法 JSON is a strict subset of JavaScript, making use of several patterns found in JavaScript to represent structured data.网络
JSON can represent four primitive types (strings, numbers, booleans, and null) and two structured types (objects and arrays).app
There was a time when XML was the de facto standard for transmitting structured data over the Internet. The fi rst iteration of web services was largely XML-based, highlighting its target of server-to-server communication.ide
JSON syntax allows the representation of three types of values:orm
Simple Values — Strings, numbers, Booleans, and null can all be represented in JSON using the same syntax as JavaScript. The special value undefined is not supported. 某一简单「数据」:单一名值对,数据有名字(key)和数据值(value),使用冒号(:)分隔server
Objects — The fi rst complex data type, objects represent ordered key-value pairs. Each value may be a primitive type or a complex type. 非线性的名值组合(多个名值对) 多个(类型)不一样的数据的「独立组合」 使用花括号({})对象
Arrays — The second complex data type, arrays represent an ordered list of values that are accessible via a numeric index. The values may be of any type, including simple values, objects, and even other arrays. 线性的名值组合(多个名值对) 多个(类型)相同的数据的「独立组合」 使用方括号([])接口
JSON exists as a string — useful when you want to transmit data across a network. It needs to be converted to a native JavaScript object when you want to access the data. This is not a big issue — JavaScript provides a global JSON object that has methods available for converting between the two.