Gson registerTypeAdapter serialize problem

Gson registerTypeAdapter XXX class ,if u want serialize XXX class instance will crash.

 

For example:

gsonBuilder.registerTypeAdapter(Anima.class,
				new AnimaAdapter());

//Anima is a normal class,and it's have some subclass 
//when u serialize Anima class instance ,will crash.
//so u must serialize Anima's subclasses instance/

  

posted on 2014-03-31 16:16  jhondge  阅读(374)  评论(0)    收藏  举报

导航