I am really confused under what circumstance and how JSON is used as a mean of data transfer from client to server. What's the benifit of using it.
7 Answers
JSON is very useful if your "client" can run JavaScript, since it is very easy to create Objects from a JSON string. In general JSON has less "overhead" than XML and is a more compact representation of simple hierarchical data.

- 24,869
- 6
- 50
- 66
JSON is amazing for it's simplicity. The beauty is in it's simple structure of objects and arrays that offers a more simple language than xml. Here's a reference for learning the basics of JSON: Json Example

- 11
- 2
JSON is lightweight text-data interchange format , self-describing and easy to understand as compared to xml.

- 1,033
- 9
- 15
It would be convenient if you have more than one client, because JSON is a well-known format.

- 10,454
- 9
- 55
- 60
It is JavaScript Object Notation. You can use it to send data back and forward. It is often recommended since there is not so much overhead, like the one you get with XML. This is why it has become more popular than XML with Ajax
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.
Link url:--
http://en.wikipedia.org/wiki/JSON
benefits of using JSON:--
http://www.developerfeed.com/json/faq/what-are-benefits-using-json-over-xml

- 1
- 1

- 5,691
- 8
- 52
- 98
Why a text format rather than a binary format?
Convenient for interoperability between different platforms. Human readable messages so easy to investigate and debug. Extensible, can add new fields without upsetting old clients. But we pay some cost, text messages will be larger than binary messages.
Why this particular text format, rather than, CSV or XML?
Preferable to CSV for supporting arbitrary complex structures, arrays etc.
JSON is simpler than XML, unless you have really good XML tools. Increasing use of JavaScript in WEB 2.0 clients makes JSON very appealing, effectively JSON is Javsacript so there's no special parsing needed. However on large projects you may find that you start to benefit from more control, and so use JSON Schemas: a step to a more XML-like world.

- 54,992
- 14
- 74
- 117
JSON is a very lightweight data transfer medium. It can be used with almost any ajax request in a system.
JSON is easier to read than XML (once you're used to it), but falls short on the data validation side of things.
Id pick XML as the transport mechanism in any entry point into a system, callable by an external party. XML is very mature and has a lot of built-ins (like strict schema validation) that would stop me needing to write a lot of plumbing code.
For everything else that is AJAXy, Id pick JSON anyday.

- 288
- 2
- 13