A Quick Look into JSON. || What is JSON
Today we are going to talk about what is JSON.
JavaScript Object Notation (JSON) is a standard text-based data format used in web development to send and receive data.
Advantages of using JSON
• It is supported by all programming languages.
• It can be used on all platforms.
• It is a lightweight database standard, so data transmission is fast.
Where JSON is used?
• API
• Web Applications
• Mobile Applications
• Gaming APIs
• IoT
Data Types Supported
• String
• Number
• Arrays
• Null
• Boolean
• Object
JSON Methods in JavaScript
1. JSON.parse(): Takes JSON string and converts it into JavaScript Object
2. JSON.stringify(): Convert JavaScript Object(JSON) into JSON String (Useful while sending over the network)
Syntax and Example
{
“name” : “Tassu”,
“technologies” : [“C” , “CPP” , “JavaScript” , “PHP”] ,
“salary” : 100000 ,
“relationship” : null ,
“address” :
{
“city” : “Islamaba”,
“block” : 25 ,
“street” : “7th Street”,
“pin_code” : 10003 ,
}
}
If you need any help. You can contact me on Instagram at https://www.instagram.com/codeculturepro/. Or you can email me at codeculturepro@gmail.com