public class GsonHandler extends java.lang.Object implements SerializationHandler
Constructor and Description |
---|
GsonHandler() |
Modifier and Type | Method and Description |
---|---|
<T> T |
deserialize(byte[] data,
TypeWrapper<T> typeWrapper)
Deserialize the response body to the specified type
|
java.lang.String |
getContentType()
Return the content type produced/consumed.
|
<T> byte[] |
serialize(T instance,
TypeWrapper<T> typeWrapper)
Serialize the request body of the specified type
|
java.lang.String |
toString() |
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getContentType()
getContentType
in interface SerializationHandler
public <T> byte[] serialize(T instance, TypeWrapper<T> typeWrapper) throws AnaplanAPISerializationException
serialize
in interface SerializationHandler
T
- the type of object being serializedinstance
- The instance to serializetypeWrapper
- The type wrapper containing the typeAnaplanAPISerializationException
public <T> T deserialize(byte[] data, TypeWrapper<T> typeWrapper) throws AnaplanAPISerializationException
deserialize
in interface SerializationHandler
T
- the type of object being deserializeddata
- The byte array containing the serialized contenttypeWrapper
- The type wrapper containing the typeAnaplanAPISerializationException