Gson can deserialize an object like
GsonBuilder gsonBuilder = new GsonBuilder();
Myclass act = gsonBuilder.create().fromJson(someJson, this.getClass());
Here we pass the Class of the model. The question is how does Gson create an object from the Class? Are they using ClassLoader? If yes, can you help me with it?
Aucun commentaire:
Enregistrer un commentaire