JSON (JavaScript Object Notation)

 

JSON (JavaScript Object Notation)

The full name of JSON is JavaScript Object Notation, which is a lightweight data exchange format created by Douglas Crockford and has been widely used in web development.

The grammar of the JSON data format was originally inspired by the grammar of JavaScript Object literal, but JSON and JavaScript are not directly related. JSON is a language agnostic data exchange format and is now supported by almost all mainstream programming languages. JSON.

The purpose of JSON

JSON is similar to XML. It is a data exchange format based on plain text. It is very suitable for transmission on the Internet. Modern browsers also have built-in support for fast parsing of JSON syntax. In addition, JSON is lightweight and easy to read and write. Features, JSON is now almost the standard for web AJAX/API data transmission format.

JSON is not only widely used in the data transmission format of the front and back ends of the web, but also widely used in data exchange between data storage and web services!

JSON data format example

{
    "firstName": "John",
    "lastName": "Smith",
    "sex": "male",
    "age": 25,
    "address": {
        "streetAddress": "21 2nd Street",
        "city": "New York",
        "state": "NY",
        "postalCode": "10021"
    },
    "phoneNumber": [
        {
            "type": "home",
            "number": "212 555-1234"
        },
        {
            "type": "fax",
            "number": "646 555-4567"
        }
    ]
}

Post a Comment

0 Comments