Top "Gson" questions

Gson is Google's open-source library for serializing and deserializing Java objects to/from JSON.

How to parse list of JSON objects surrounded by [] using Retrofit and GSON?

I've created a simple REST endpoint: http://<server_address>:3000/sizes This URL returns a very simple response containing …

java json rest gson retrofit2
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 …

json gson kml android
ProGuard and Gson on Android (ClassCastException)

I am having a hell of a time with Gson and ProGuard. I have a simple object and when I …

android gson proguard
Moshi vs Gson in android

I'm deciding on whether to use Moshi by square or Gson to serialize and deserialize model data. one thing i …

android gson deserialization moshi
org.json.JSONObject vs Gson library JsonObject

What are differences between this two classes? If someone uses Gson library is it preferable to use com.google.json.…

android json gson android-json
Getting java.lang.NoClassDefFoundError while using Google Gson library

I am using Gson library to convert objects to Json and vice versa. I have copied the jars of that …

eclipse classpath gson apache-httpclient-4.x apache-httpcomponents
Is there a standard implementation for a GSON Joda Time serialiser?

I'm using GSON to serialise some object graphs to JSON. These objects graphs use Joda Time entities (DateTime, LocalTime etc). …

java gson jodatime
com.google.gson.JsonPrimitive cannot be cast to com.google.gson.JsonObject ERROR

When i try to parjse the json object from thelist i get an error com.google.gson.JsonPrimitive cannot be …

exception gson classcastexception
Using GSON with proguard enabled

My code works perfectly without proguard, but GSON doesn't work when proguard is enabled. This is the part of code …

android gson proguard obfuscation
let Gson throw exceptions on wrong types

I use Gson inside my projects to deserialize JSON-Strings to Java-Objects. If I do a request, I expect a well-defined …

java json gson type-safety