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)