Sitemap
Nazmul Ali Biswas (Web App Developer)

Nazmul Ali Biswas (Web App Developer)

I'm a motivated, results-driven software pro with strong technical skills and work ethic. Visit: www.nazmulalibiswas.com Email: hireme@nazmulalibiswas.com

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.
Press enter or click to view image in full size

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:

  1. Key: A key is always a string enclosed in quotation marks
  2. Value: A value can be string, number, Boolean expression, array or object
"firstName": "Nazmulalbiswas Dev",
Press enter or click to view image in full size
The key is “firstName” & value is “Nazmulalibiswas Dev”

JSON.parse()

When receiving data from a web server, the data is always a string

'{"name: "Ali", "age": ="18", "country": "Bangladesh"}';
Press enter or click to view image in full size
let obj = JSON.parse('{"name: "Ali", "age": ="18", "country": "Bangladesh"}');
Press enter or click to view image in full size

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"
}'
Press enter or click to view image in full size
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

--

--

Nazmul Ali Biswas (Web App Developer)
Nazmul Ali Biswas (Web App Developer)

Written by Nazmul Ali Biswas (Web App Developer)

I'm a motivated, results-driven software pro with strong technical skills and work ethic. Visit: www.nazmulalibiswas.com Email: hireme@nazmulalibiswas.com