public final class KeypleGsonParser
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static com.google.gson.Gson |
getParser()
Gets the singleton instance of the parser.
|
static com.google.gson.Gson |
registerTypeAdapter(java.lang.Class<?> matchingClass,
java.lang.Object adapter,
boolean withSubclasses)
Registers a new type adapter and returns the updated parser.
|
public static com.google.gson.Gson getParser()
If not created yet, a default instance is created.
public static com.google.gson.Gson registerTypeAdapter(java.lang.Class<?> matchingClass, java.lang.Object adapter, boolean withSubclasses)
matchingClass
- The type to be registered.adapter
- The type adapter to be registered (should implement JsonSerializer
and/or JsonDeserializer
).withSubclasses
- Apply this adapter to subclasses of matchingClass also.