Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where/when we use JSON?

Could you please tell me, what is the use of JSON (in Javascript and PHP). when we need a JSON method.

I read from the following link but, i didn't get any information regarding the JSON implementation on any project.

http://www.json.org/js.html

like image 268
coderex Avatar asked Jul 21 '09 20:07

coderex


2 Answers

JSON is a light-weight data-interchange format (think of it as XML on a diet). Basically any place where you can use XML for serializing data you can use JSON instead.

like image 121
Andrew Hare Avatar answered Oct 11 '22 05:10

Andrew Hare


Despite its name, one of the primary uses of the JSON format is in AJAX web development (though certainly not the only one). It is often preferred over the traditional XML for its light-weight syntax.

like image 32
Noldorin Avatar answered Oct 11 '22 04:10

Noldorin