1[
2 {
3 "id": "0001",
4 "type": "donut",
5 "name": "Cake",
6 "ppu": 0.55,
7 "batters":
8 {
9 "batter":
10 [
11 { "id": "1001", "type": "Regular" },
12 { "id": "1002", "type": "Chocolate" },
13 { "id": "1003", "type": "Blueberry" },
14 { "id": "1004", "type": "Devil's Food" }
15 ]
16 },
17 "topping":
18 [
19 { "id": "5001", "type": "None" },
20 { "id": "5002", "type": "Glazed" },
21 { "id": "5005", "type": "Sugar" },
22 { "id": "5007", "type": "Powdered Sugar" },
23 { "id": "5006", "type": "Chocolate with Sprinkles" },
24 { "id": "5003", "type": "Chocolate" },
25 { "id": "5004", "type": "Maple" }
26 ]
27 },
28 {
29 "id": "0002",
30 "type": "donut",
31 "name": "Raised",
32 "ppu": 0.55,
33 "batters":
34 {
35 "batter":
36 [
37 { "id": "1001", "type": "Regular" }
38 ]
39 },
40 "topping":
41 [
42 { "id": "5001", "type": "None" },
43 { "id": "5002", "type": "Glazed" },
44 { "id": "5005", "type": "Sugar" },
45 { "id": "5003", "type": "Chocolate" },
46 { "id": "5004", "type": "Maple" }
47 ]
48 },
49 {
50 "id": "0003",
51 "type": "donut",
52 "name": "Old Fashioned",
53 "ppu": 0.55,
54 "batters":
55 {
56 "batter":
57 [
58 { "id": "1001", "type": "Regular" },
59 { "id": "1002", "type": "Chocolate" }
60 ]
61 },
62 "topping":
63 [
64 { "id": "5001", "type": "None" },
65 { "id": "5002", "type": "Glazed" },
66 { "id": "5003", "type": "Chocolate" },
67 { "id": "5004", "type": "Maple" }
68 ]
69 }
70]
71
1[{"_id":"60beb338abe3dd4300d844b8","email":"hemitpatel0@gmail.com","typeVaccine":"Moderna","status":"Yes","__v":0},{"_id":"60bf716b145de95f1c84fb2f","email":"hemit.2009@outlook.com","typeVaccine":"Asternzcana","status":"No","__v":0},{"_id":"60bf7196145de95f1c84fb31","email":"hemitpatel@computer4u.com","typeVaccine":"Phizer","status":"Yes","__v":0},{"_id":"60bf758f145de95f1c84fb32","email":"blahbro96@gmail.com","typeVaccine":"none","status":"No","__v":0},{"_id":"60bf7cda145de95f1c84fb33","email":"vimal4282@yahoo.co.in","typeVaccine":"Moderna","status":"Yes","__v":0}]
1{
2 "first_name": "Taylor",
3 "last_name": "Hawkes",
4 "age": 31,
5 "address": {
6 "street": "954 Kazaam Lane",
7 "city": "Boulder",
8 "state": "CO",
9 "postalCode": "80303"
10 },
11 "emails": [
12 {
13 "type": "main",
14 "number": "th71852@gmail.com"
15 },
16 {
17 "type": "secondary",
18 "number": "taylordhawkes@gmail.com"
19 }
20 ]
21}
1JavaScript Object Notation
2 Its a key value pair
3 its popular light-weight way of transfering data
4
5 for example :
6 Lets try to create a json for Person Object
7 with name , age , isMarried , gender
8
9 Its ket value pair
10 the key is always String and need to be in quotation
11 value can be :
12 String
13 Number
14 Boolean
15 null
16 array
17 another json object
18
19
20 This is one json with 5 fields
21 each key value pair should be separated by comma
22 {
23 "name" : "Anna",
24 "age" : 18 ,
25 "isMarried" : false ,
26 "gender" : "female",
27 "company" : null
28 }
1JSON stands for JavaScript Object Notation.
2It is a lightweight format for storing and transporting data.
3It is often used when data is sent from a server to a web page.
4It is "self-describing" and easy to understand.