Rishabh Maurya Rishabh Maurya - 1 month ago 14
JSON Question

What is the difference between gson and json?

I see word 'gson' at various places in books related to android , blogs etc. Is it similar to kml in any way or it is different .

Ben Ben
Answer

JSON is a data format that is human-readable and supported by a wide variety of languages. An example of JSON encoded data:

{
  "name":"John",
  "age":27,
  "interests":["running", "guitar", "foreign movies"],
  "favorites":{
               "color":"blue",
               "book":"Gödel, Escher, Bach: An Eternal Golden Braid"
              }
}

GSON is a java library from Google that converts java objects to their JSON representations, and vice-versa. Installation instructions and sample usage here.

Comments