Top "Gson" questions

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

How to parse JSON Array (Not Json Object) in Android

I have a trouble finding a way how to parse JSONArray. It looks like this: [{"name":"name1","url":"url1"},{"name":"…

java android json gson arrays
Gson - convert from Json to a typed ArrayList<T>

Using the Gson library, how do I convert a JSON string to an ArrayList of a custom class JsonLog? Basically, …

java android json gson
How to convert a String to JsonObject using gson library

Please advice how to convert a String to JsonObject using gson library. What I unsuccesfully do: String string = "abcde"; Gson …

java json gson
GSON - Date format

I'm trying to have a custom date format in Gson output, but .setDateFormat(DateFormat.FULL) doesn't seem to work and …

java gson
Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $

What is this error ? How can I fix this? My app is running but can't load data. And this is …

android json gson retrofit
gson throws MalformedJsonException

I'm using gson to convert a json string to a Java-Object. The value of result2 is exactly the same as …

java json gson
Parsing JSON array into java.util.List with Gson

I have a JsonObject named "mapping" with the following content: { "client": "127.0.0.1", "servers": [ "8.8.8.8", "8.8.4.4", "156.154.70.1", "156.154.71.1" ] } I know I can get the array "servers" …

java json parsing gson
Jackson Vs. Gson

After searching through some existing libraries for JSON, I have finally ended up with these two: Jackson Google GSon I …

java json comparison gson jackson
Converting Object to JSON and JSON to Object in PHP, (library like Gson for Java)

I am developing a web application in PHP, I need to transfer many objects from server as JSON string, is …

php gson json
Using GSON to parse a JSON array

I have a JSON file like this: [ { "number": "3", "title": "hello_world", }, { "number": "2", "title": "hello_world", } ] Before when files had a …

java arrays json gson