Top "Gson" questions

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

JsonParser is deprecated

Getting deprecated message for JsonParser for Spring Boot app, JsonObject jsonObject = new JsonParser().parse(result).getAsJsonObject(); What is the alternative?

spring spring-boot parsing gson jsonparser
How do I implement TypeAdapterFactory in Gson?

How do I implement type TypeAdapterFactory in Gson? The main method of create is generic. Why? The registration method registerTypeAdapterFactory() …

java json serialization gson deserialization
Serialize Java 8 LocalDate as yyyy-mm-dd with Gson

I am using Java 8 and the latest RELEASE version (via Maven) of Gson. If I serialize a LocalDate I get …

java gson
Android Studio 2.0 Preview: ':app:transformClassesWithInstantRunForDebug' FAILED

I'm getting this error in Gradle in Android Studio: :cart:transformClassesWithInstantRunForDebug FAILED Error:Execution failed for task :cart:transformClassesWithInstantRunForDebug'.> …

android android-studio gson android-json
Gson NoClassDefFoundError after ADT and SDK Tools update to v17

Today I updated my ADT and SDK Tools to v17 and my projects using Google's gson jar library started to …

android gson adt noclassdeffounderror
Gson - deserialization to specific object type based on field value

I want to deserialize json objects to specific types of objects (using Gson library) based on type field value, eg.: [ { "…

java json deserialization gson
how to map a JSON to a java model class

I need to map JSON obj to a class and its arrays to ArrayList in Android and it should have …

java android json jsonserializer gson
Store JSON data in Java

I want to learn JSON data storage in Java using Eclipse, so I googled a lot. I found JSON.simple …

java json gson json-simple
java.lang.NumberFormatException: Expected an int but was 0.6 at line 1 column 8454

I'm using the retrofit library for my calls in a demo project. I received the following error: java.lang.NumberFormatException: …

java android gson retrofit retrofit2
AssertionError in Gson EnumTypeAdapter when using Proguard Obfuscation

My project implements a TypeAdapter in Gson during serialization/deserialization for preserving object's polymorphism state. Anyhow, the project works fine …

android gson proguard