public class BaseToolboxTypeAdapter extends Object implements com.google.gson.JsonDeserializer<BaseToolboxType>, com.google.gson.JsonSerializer<BaseToolboxType>
| Constructor and Description |
|---|
BaseToolboxTypeAdapter() |
| Modifier and Type | Method and Description |
|---|---|
BaseToolboxType |
deserialize(com.google.gson.JsonElement json,
Type typeOfT,
com.google.gson.JsonDeserializationContext context)
Gson invokes this call-back method during deserialization when it encounters a field of the specified type.
|
com.google.gson.JsonElement |
serialize(BaseToolboxType src,
Type typeOfSrc,
com.google.gson.JsonSerializationContext context)
Gson invokes this call-back method during serialization when it encounters a field of the specified type.
|
public com.google.gson.JsonElement serialize(BaseToolboxType src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
serialize in interface com.google.gson.JsonSerializer<BaseToolboxType>src - the object that needs to be converted to Json.typeOfSrc - the actual type (fully genericized version) of the source object.context - The JsonSerializationContextpublic BaseToolboxType deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
deserialize in interface com.google.gson.JsonDeserializer<BaseToolboxType>json - The Json data being deserializedtypeOfT - The type of the Object to deserialize tocontext - The JsonDeserializationContextcom.google.gson.JsonParseException - if json is not in the expected format of typeofTCopyright © 2017–2019 SoftVision Development GmbH, Fulda, Germany. All rights reserved.