JSON
By Saket Bhatnagar••Beginner to Intermediate
What is JSON?
- 1JSON stands for javascript object notation.
- 2It is data only format to represent values and objects.
- 3It is used to transfer data between applications through apis.
- 4JSON keys must be strings enclosed in double quotes.
- 5It supports six data types: object, array, string, number, boolean, and null.
- 6It supports nested structures, allowing objects and arrays to be nested within each other.
JSON methods
- 1JSON.stringify(value)
- - JSON.stringify() is a method that converts a JavaScript object or value into a JSON string.
- - Returns JSON.
- - It does not support : function properties,symbolic keys and values and Properties that store undefined.
- 2JSON.parse(value)
- - JSON.parse() is a method that converts JSON string into JavaScript object or value.
- - Returns plain javascript object.