Back to project page spotastop.
The source code is released under:
MIT License
If you think the Android project spotastop listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.nicfix.gsoncompatibility; // ww w . j ava 2 s . c om import resources.Resource; import responses.beContentResponse; import com.google.gson.Gson; import com.google.gson.GsonBuilder; public class GsonConfigurator { private GsonBuilder gsonBuilder; private static GsonConfigurator instance; public static GsonConfigurator getInstance() { if (instance == null) { instance = new GsonConfigurator(); } return instance; } private GsonConfigurator() { gsonBuilder=new GsonBuilder(); gsonBuilder.registerTypeAdapter(beContentResponse.class, new beContentResponse()); } public Gson build() { return gsonBuilder.create(); } public void registerDeserializer(Resource resource, Class T) { gsonBuilder.registerTypeAdapter(T, resource); } }