Getting start with JSON
Chapters
JSON vs XML, where is the advantage
XML and JSON are designed for standardized and simple way of describing different kinds of hierarchical data structures and to facilitate their consumption and transportation in a standardized way.
Advantage of JSON Over XML:-
- JSON is a valid subset of Python, JavaScript and YAML
- JSON parsing is faster than XML parsing.
- JSON is compact format.
- Formatted JSON is easier to read than formatted XML.
- JSON specifies how to represent complex datatypes.
Below is the example of JSON and XML format.
JSON
{ "Customer": [ { "id":"01", "firstName": "N", "lastName": "C" } ] }
XML
<Customer > <id>01</id> <firstName >N</firstName> < lastName >C</lastName> </Customer >
Clearly, if the data utilized by webservices grow, XML will loose an edge, Number of Bytes travelled between servers and clients is largely reduced if JSON is used for data exchange.
Description
In this tutorial you will learn
- What is JSON
- Syntax
- Datatypes with JSON
- Objects
- Schema
- XML vs JSON
- Using with PHP and Java
This tutorial is a quick walkthrough over the technology
Learning Objectives
Objective of this tutorial is to give you enough information on JSON to get you started with the technology
Author: Subject Coach
Added on: 20th Jul 2015
You must be logged in as Student to ask a Question.
None just yet!