@Deprecated public class GsonSerialDeserial extends TextualObjectSerialDeserial
Modifier and Type | Field and Description |
---|---|
static String |
APPLICATION_JSON
Deprecated.
Mime type used by the serial/deserial
|
static String |
CHARSET_UTF_8
Deprecated.
Charset used by the serial/deserial
|
Constructor and Description |
---|
GsonSerialDeserial()
Deprecated.
Default constructor that creates an instance of Gson entity.
|
GsonSerialDeserial(com.google.gson.Gson gson)
Deprecated.
Default constructor that uses the provided instance of Gson.
|
Modifier and Type | Method and Description |
---|---|
protected com.google.gson.Gson |
buildDefaultGson()
Deprecated.
Builds the default instance of Gson.
|
<T> T |
deserializeObject(String source,
Class<T> targetClass,
String mimeType)
Deprecated.
Extract an object instance from a given source object.
|
com.google.gson.Gson |
getGson()
Deprecated.
|
String |
serializeObject(Object targetObject,
String mimeType)
Deprecated.
Returns a given representation of the target object.
|
getCharset, getIObjectSerialDeserial, getMimeType, isMimeTypeSupported, objectToResponse, requestToObject
public static final String CHARSET_UTF_8
public static final String APPLICATION_JSON
public GsonSerialDeserial()
public GsonSerialDeserial(com.google.gson.Gson gson)
gson
- the instance to use.protected com.google.gson.Gson buildDefaultGson()
public com.google.gson.Gson getGson()
public String serializeObject(Object targetObject, String mimeType)
IObjectSerialDeserial
mimeType
- the target MIME type.public <T> T deserializeObject(String source, Class<T> targetClass, String mimeType)
IObjectSerialDeserial
source
- the source object.targetClass
- the type of the returned object.mimeType
- the target MIME type.Copyright © 2015. All rights reserved.