SihaoPedia ʕ•ᴥ•ʔ

JSON Introduction

JSON stands for JavaScript Object Notation

JSON stores two types of data

  1. An object
  2. An Array of values

Object

An object starts with left curly brace { and ends with a right curly brace }.

Inside of an object, the dictionary is formed by pairs of property names and values.

Each property is separated from each other by a comma ,.

The property names and property values are separated by a colon :.

{
    "name": "John", 
    "age": 30 
}

Array of values

An array is a list of values, and values can take many forms:

JSON value forms

Example

{
   "employees":[
      {
         "name":"Shyam",
         "email":"shyamjaiswal@gmail.com"
      },
      {
         "name":"Bob",
         "email":"bob32@gmail.com"
      },
      {
         "name":"Jai",
         "email":"jai87@gmail.com"
      }
   ]
}

JSON Official Website https://www.json.org/json-en.html

#Json