JSON (Javascript Object Notation)
๐A common use of JSON is to exchange data to/from a server.
๐ When receiving data from web server and sending data to a web
server the data has to be string.
๐ Javascript has built in function for converting JSON string
into javascript object "JSON.parse()"and Javascript Object into
JSON string "JSON.stringify()"
๐ JSON.parse() - To received data in pure text format(string)
from server and use it as javascript object use JSON.parse()
๐JSON.stringify() - To send a JavaScript object to a server in
pure text format(string)use JSON.stringify().
Thank you for reading. Sharing my daily learnings with all. Follow me to get more such content.
Top comments (0)