Simple JSON


Basic concepts

JSON(JavaScript Object Notation)A lightweight data structure widely used for data transmission in networks.

Two structures

  • Name / value pairA collection similar to that in PythonDictionaries
  • valueSequential lists, similar to those in Javaarray


  • Curly braces(‘{‘,’}’): Indicates aobject
  • Middle brackets(‘[‘,’]’): Indicates aarray
  • comma(‘,’): RepresentationParataxis
  • whateverBlank character(Spaces, carriage return, tabs, etc.): For visual pleasure.


  • String: The style of C language, which can contain escaped characters, usingUnicodeCharacter,
  • Number: C Language Style, Availablee/ETo count scientifically, decimals, etc.
  • True: “True”.
  • False: “false”.
  • Null: means no content.
  • Object: As mentioned aboveName / value pairSet,
  • Array:valueThere are sequential lists.

Examples and others

As you can see from the above, JSON can be infinitenesting
An example (JSON object):

    "name": "Tom",
    "age": 29,
    "gender": true,
    "contact": [
        "office": "1234-7654321",
        "private": "13812345678"

An example (JSON array):

    "Tom": {
        "title": "professor",
        "department": "logistic",
        "salary": 6516.52
    "Jerry": {
        "title": "teacher",
        "department": "logistic",
        "salary": 4358.64