https://groups.google.com/forum/?hl=en_US#!topic/google-gson/L2ALXLxguNY
was using gson-1.2.2 version and decided to upgrade to the gson-2.0.
The only drawback I've had so far is that in version 1.2.2, when a
field is ignored in the json, it is converted to null.
For example this class.
Class Persona{
private String nombre;
private Long id;
private Genero genero = new Genero();
}
If I send the following json
{"id":1,"nombre":"juan"}
In version 1.2.2 the java object
nombre = “juan”
id= 1
genero = null
Performing tests on version 2.0. I have
nombre = “juan”
id= 1
genero = object
What can i do? .. or that is the default in new versions?
Original issue reported on code.google.com by inder123 on 16 Dec 2011 at 4:54
Original issue reported on code.google.com by
inder123
on 16 Dec 2011 at 4:54