JavaScript Object Notation (JSON)
What is JSON?
- JSON stands for JavaScript Object Notation
- JSON is lightweight format for storing & transporting data.
- JSON is “Self-describing” and easy to understand
- JSON is often Used when data is sent from a server to a web page.
JSON Example
Here is defines an instaChannel object: an array of 3 channel records (objects)
{
"InstaChannels" : [
{
"firstName": "Nazmulalbiswas Dev",
"ChannelName": "@nazmulalibiswas"
},
{
"firstName": "Ali Dev",
"ChannelName": "@alijavaScript"
},
{
"firstName": "Biswas Dev",
"ChannelName": "@biswasjavaScript"
},
{
"firstName": "Team Dev",
"ChannelName": "@teamjavaScript"
},
]
}Keys & Values
The two parts that make up JSON are keys and values
Get Nazmul Ali Biswas (Web App Developer)’s stories in your inbox
Join Medium for free to get updates from this writer.
Together they make a key/value pair:
- Key: A key is always a string enclosed in quotation marks
- Value: A value can be string, number, Boolean expression, array or object
"firstName": "Nazmulalbiswas Dev",JSON.parse()
When receiving data from a web server, the data is always a string
'{"name: "Ali", "age": ="18", "country": "Bangladesh"}';let obj = JSON.parse('{"name: "Ali", "age": ="18", "country": "Bangladesh"}');JSON.stringify()
The JSON.stringify() method convert a javaScript object or value to JSON string. Opthonally replacing including only the specified properties if a replacer array is specified.
'{
"name": "Ali",
"age": "18",
"country": "Bangladesh"
}'Follow me🔥!
👨💻Nazmul Ali Biswas
Visit: www.nazmulalibiswas.com
🔗Full-stack Web Application Developer
☄ For any Inquiry:
📩 Email: nazmulalibiswas.dev@gmail.com
or hireme@nazmulalibiswas.com







