Gson().fromjson(jsonresult, Myobject.class) Return Values In 0's
I have this json {'FechaUpdateId':1,'FechaSegundos':635902782941643690,'FechaSegundosBC':635902779020935030} I execute this command for convert it to object FechaUpdate dto = new
Solution 1:
Solved
if you see my private attributes they are
privateint fechaUpdateId ;
privatelong fechaSegundos ;
privatelong fechaSegundosBC;
I change them by
privateint FechaUpdateId ;
privatelong FechaSegundos ;
privatelong FechaSegundosBC;
and generate the getter and setters again. the diference is the First letter is UpperCase.
Post a Comment for "Gson().fromjson(jsonresult, Myobject.class) Return Values In 0's"