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 .
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 API from Google that converts java objects to their JSON representations and vice-versa. Installation instructions and sample usage here.
Google Gson is a simple Java-based library to serialize Java objects to JSON and vice versa. It is an open-source library developed by Google.
The following points highlight why you should be using this library −
Standardized − Gson is a standardized library that is managed by Google.
Efficient − It is a reliable, fast, and efficient extension to the Java standard library. Optimized − The library is highly optimized.
Support Generics − It provides extensive support for generics.
Supports complex inner classes − It supports complex objects with deep inheritance hierarchies.
Gson is Java API,used to convert between Java objects and JSON objects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With