-
Notifications
You must be signed in to change notification settings - Fork 1
Introduction To JSON
Hardikb19 edited this page Dec 13, 2019
·
1 revision
JSON stands for JavaScript Object Notation. It is a lightweight format for storing and transporting data often used when data is sent from a server to a web page
When exchanging data between a browser and a server, the data can only be text. JSON is text, and we can convert any JavaScript object into JSON, and send JSON to the server. We can also convert any JSON received from the server into JavaScript objects. This way we can work with the data as JavaScript objects, with no complicated parsing and translations.
- Data is in name/value pairs
- Data is separated by commas
- Curly braces hold objects
- Square brackets hold an array
In JSON, values must be one of the following data types:
- a string
- a number
- an object (JSON object)
- an array
- a boolean
- null