android - save Json object to a class with variable name same as in Json -


i want save json object class variable names same in json (just gson does). problem use gson is, datatype of class variable in json changes according datas available in server. example, times, contains list of data,and other time, contains "" null. gson crashes while dealing both cases single code.

you can use normal json object, gson predefined datatype , makes handling data easier. if have changes in datatype, better use json itself.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -