Class RegistrationSessionSettingsJsonAdapter
- java.lang.Object
-
- com.appliedrec.verid.core2.session.VerIDSessionSettingsJsonAdapter<RegistrationSessionSettings>
-
- com.appliedrec.verid.core2.session.RegistrationSessionSettingsJsonAdapter
-
- All Implemented Interfaces:
CborCoder<RegistrationSessionSettings>
,CborDecoder<RegistrationSessionSettings>
,CborEncoder<RegistrationSessionSettings>
,com.google.gson.JsonDeserializer<RegistrationSessionSettings>
,com.google.gson.JsonSerializer<RegistrationSessionSettings>
public class RegistrationSessionSettingsJsonAdapter extends VerIDSessionSettingsJsonAdapter<RegistrationSessionSettings>
-
-
Constructor Summary
Constructors Constructor Description RegistrationSessionSettingsJsonAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addProperties(com.fasterxml.jackson.dataformat.cbor.CBORGenerator cborGenerator, RegistrationSessionSettings settings)
protected RegistrationSessionSettings
createSettings()
RegistrationSessionSettings
deserialize(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context)
Gson invokes this call-back method during deserialization when it encounters a field of the specified type.protected void
parseProperty(com.fasterxml.jackson.dataformat.cbor.CBORParser parser, RegistrationSessionSettings settings, java.lang.String fieldName)
com.google.gson.JsonElement
serialize(RegistrationSessionSettings src, java.lang.reflect.Type typeOfSrc, com.google.gson.JsonSerializationContext context)
Gson invokes this call-back method during serialization when it encounters a field of the specified type.-
Methods inherited from class com.appliedrec.verid.core2.session.VerIDSessionSettingsJsonAdapter
decodeFromCbor, encodeToCbor
-
-
-
-
Method Detail
-
createSettings
protected RegistrationSessionSettings createSettings()
- Specified by:
createSettings
in classVerIDSessionSettingsJsonAdapter<RegistrationSessionSettings>
-
serialize
public com.google.gson.JsonElement serialize(RegistrationSessionSettings src, java.lang.reflect.Type typeOfSrc, com.google.gson.JsonSerializationContext context)
Description copied from interface:com.google.gson.JsonSerializer
Gson invokes this call-back method during serialization when it encounters a field of the specified type.In the implementation of this call-back method, you should consider invoking
JsonSerializationContext.serialize(Object, Type)
method to create JsonElements for any non-trivial field of thesrc
object. However, you should never invoke it on thesrc
object itself since that will cause an infinite loop (Gson will call your call-back method again).- Specified by:
serialize
in interfacecom.google.gson.JsonSerializer<RegistrationSessionSettings>
- Overrides:
serialize
in classVerIDSessionSettingsJsonAdapter<RegistrationSessionSettings>
- Parameters:
src
- the object that needs to be converted to Json.typeOfSrc
- the actual type (fully genericized version) of the source object.- Returns:
- a JsonElement corresponding to the specified object.
-
deserialize
public RegistrationSessionSettings deserialize(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
Description copied from interface:com.google.gson.JsonDeserializer
Gson invokes this call-back method during deserialization when it encounters a field of the specified type.In the implementation of this call-back method, you should consider invoking
JsonDeserializationContext.deserialize(JsonElement, Type)
method to create objects for any non-trivial field of the returned object. However, you should never invoke it on the same type passingjson
since that will cause an infinite loop (Gson will call your call-back method again).- Specified by:
deserialize
in interfacecom.google.gson.JsonDeserializer<RegistrationSessionSettings>
- Overrides:
deserialize
in classVerIDSessionSettingsJsonAdapter<RegistrationSessionSettings>
- Parameters:
json
- The Json data being deserializedtypeOfT
- The type of the Object to deserialize to- Returns:
- a deserialized object of the specified type typeOfT which is a subclass of
T
- Throws:
com.google.gson.JsonParseException
- if json is not in the expected format oftypeofT
-
parseProperty
protected void parseProperty(com.fasterxml.jackson.dataformat.cbor.CBORParser parser, RegistrationSessionSettings settings, java.lang.String fieldName) throws java.lang.Exception
- Specified by:
parseProperty
in classVerIDSessionSettingsJsonAdapter<RegistrationSessionSettings>
- Throws:
java.lang.Exception
-
addProperties
protected void addProperties(com.fasterxml.jackson.dataformat.cbor.CBORGenerator cborGenerator, RegistrationSessionSettings settings) throws java.lang.Exception
- Specified by:
addProperties
in classVerIDSessionSettingsJsonAdapter<RegistrationSessionSettings>
- Throws:
java.lang.Exception
-
-