杰克逊的以下课程相当于什么?
public class JsonConverter
{
private static final JsonConverter INSTANCE = new JsonConverter();
private Gson gson;
private JsonConverter() {
GsonBuilder gsonBilder = new GsonBuilder();
gsonBilder.registerTypeAdapter(AbstractElement.class, new AbstractElementAdapter());
gsonBilder.registerTypeAdapter(ClientAction.class, new ClientActionEnumAdapter());
gsonBilder.serializeNulls();
gson = gsonBilder.create();
}
public static Gson getGson() {
return INSTANCE.gson;
}
}