JavaScript JSON

JavaScript JSON


JavaScript JSON
In this tutorial, you will learn about JavaScript JSON:
JSON refers to JavaScript Object Notation or the full form of JSON is JavaScript Object Notation.
JSON Full Form - javatpoint
What is JSON
  • JSON refers to JavaScript Object Notation. 
  • JSON is a data-interchange format which is significantly lightweight.
  • JSON is plain text written in JavaScript object notation
  • JSON is used to send data between computers
  • JSON is language independent *
Example 1–
Output –
Example 2 –
Output –
Note: The library is able to validate object against schemas, generate random objects conforming to a given schema, and serialize/deserialize to/form JSON Schema.
Why Use JSON?
The JSON form is syntactically similar to the code for creating JavaScript objects. Because of this, a JavaScript Program can easily be sent between computers, and used by any programming language.
JavaScript has a built in function for converting JSON strings into JavaScript objects:
 JSON.parse()
JavaScript also has a built in function for converting an object into a JSON string:
JSON.stringify()