Loading Please Wait...
Both JSON and XML can be used to receive data from a web server.
The following XML examples defines an employees object, with an array of 3 employees:
<employees>
<employee>
<firstName>John</firstName> <lastName>Doe</lastName>
</employee>
<employee>
<firstName>Anna</firstName> <lastName>Smith</lastName>
</employee>
<employee>
<firstName>Peter</firstName> <lastName>Jones</lastName>
</employee>
</employees>
The following JSON examples defines the same employees object:
{"employees":[
{ "firstName":"John", "lastName":"Doe" },
{ "firstName":"Anna", "lastName":"Smith" },
{ "firstName":"Peter", "lastName":"Jones" }
]}
JSON is Like XML Because:
JSON is Unlike XML Because:
XML is much more difficult to parse than JSON. JSON is parsed into a ready-to-use JavaScript object.
For AJAX applications, JSON is faster and easier than XML.
Using XML:
Using XML:
How you feel about this blog:
Share this blog on:
If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com
Contact UsWe are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..
Copyright ©
, Lynxsia IT Solutions, All rights reserved