JSON which is popularly known as javascript object notation, it is a text format used to transfer data from server to client in plain text format.
the format of json is similar to javascript objects.
here is how javascript object looks like:
next we are going to convert this person
object to JSON
using a method called JSON.parse()
the output looks like plain text. and that is called JSON
data
{"firstName":"John","lastName":"Doe","age":17,"address":{"city":"abc city","street":"abc street"}}
to convert back this JSON
data to string we should use a method called JSON.stringify()
and pass person object to it
there is an amazing website called https://jsonlint.com/ to test our json code
Top comments (1)
explictly explain json's concept, I love it!