public class JsonSerialization extends Object implements Serialization
Serialization
. It acts as a facade to
gwt-jackson.Modifier and Type | Method and Description |
---|---|
boolean |
canDeserialize(String type)
Verify if the given parameterized type can be deserialized.
|
boolean |
canSerialize(String type)
Verify if the given parameterized type can be serialized.
|
<T> T |
deserialize(String json,
String type)
Deserializes the object to the type represented by
parameterizedType . |
protected com.github.nmorel.gwtjackson.client.JsonDeserializationContext.Builder |
getDeserializationContext() |
protected com.github.nmorel.gwtjackson.client.JsonSerializationContext.Builder |
getSerializationContext() |
<T> String |
serialize(T o,
String type)
Serializes the object as a type represented by
parameterizedType . |
public boolean canSerialize(String type)
Serialization
canSerialize
in interface Serialization
type
- the parameterized type.true
if parameterizedType
can be serialized, otherwise false
.public boolean canDeserialize(String type)
Serialization
canDeserialize
in interface Serialization
type
- the parameterized type.true
if parameterizedType
can be deserialized, otherwise false
.public <T> String serialize(T o, String type)
Serialization
parameterizedType
.serialize
in interface Serialization
T
- the type of the object.o
- the object to serialized.type
- the parameterized type of the object to serialize.public <T> T deserialize(String json, String type)
Serialization
parameterizedType
.deserialize
in interface Serialization
T
- the return type.json
- the String representing the serialized object.type
- the parameterized type of the expected return type.T
.protected com.github.nmorel.gwtjackson.client.JsonSerializationContext.Builder getSerializationContext()
protected com.github.nmorel.gwtjackson.client.JsonDeserializationContext.Builder getDeserializationContext()
Copyright © 2010–2014 Arcbees. All rights reserved.