Top "Gson" questions

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

Java Date to UTC using gson

I can't seem to get gson to convert a Date to UTC time in java.... Here is my code... Gson …

java json date gson utc
Parse a nested JSON using gson

{ "Response": { "MetaInfo": { "Timestamp": "2011-11-21T14:55:06.556Z" }, "View": [ { "_type": "SearchResultsViewType", "ViewId": 0, "Result": [ { "Relevance": 0.56, "MatchQuality": { "Country": 1, "State": 1, "County": 1, "City": 1, "PostalCode": 1 }, "Location": { "…

java json gson
ProGuard for Android and GSON

I'm setting up ProGuard for my Android project. My project also uses GSON. I've researched ProGuard configurations for compatibility with …

java android configuration gson proguard
java.lang.RuntimeException: Failed to invoke public com.example.syncapp.MessageBase() with no args

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println(request.getParameter("msg").toString()); String data = request.…

java android json gson runtimeexception
Convert from JSon to multiple unknown java object types using GSon

I have a netty decoder which uses GSon to convert JSon coming from web client to appropriate java objects. The …

java json gson netty
Using Gson in Kotlin to parse JSON array

Trying to parse JSON array in Kotlin, made it work for single JSON object to a WeatherObject object (code snippet …

android kotlin gson json-deserialization
Does it make sense to use reflection when implementing toString()?

@Override public String toString() { return new Gson().toJson(this); } Am I breaking some good practice, "Joshua"-pattern thing, general design …

java json reflection orm gson
Google's Json Parsing Gson library: What's the difference between JsonElement and JsonObject?

public abstract class JsonElement extends Object A class representing an element of Json. It could either be a JsonObject, a …

java android gson
Using Gson instead of Jackson in Jersey

I have a RESTful service that consumes and produces JSON objects, and I would like Jersey to use Gson instead …

jaxb jersey jax-rs jackson gson
JSON string from Gson: remove double quotes

Here is an example of my Json code: array("id" => 0, "navn" => "Vind telefon", "udgiver" => "Telia", "beskrivelse" => …

java json gson