public class EnumSerializer extends java.lang.Object implements Serializer
| Constructor and Description |
|---|
EnumSerializer() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDeserialize(javax.json.JsonValue value)
Returns whether this serializer can deserialize the given JsonValue.
|
boolean |
canSerialize(java.lang.Class<?> clazz)
Returns whether this serializer can serialize the given specific class.
|
void |
decrementLevel()
Decrements the level.
|
java.lang.Object |
fromJson(javax.json.JsonValue json)
Deserializes the given Json to an object.
|
void |
incrementLevel()
Increments the level, where the level denotes how far into the structure the current serializer is.
|
javax.json.JsonValue |
toJson(java.lang.Object object)
Serializes the given object to Json.
|
public boolean canSerialize(java.lang.Class<?> clazz)
SerializercanSerialize in interface Serializerclazz - The class of the object to be serialized.public boolean canDeserialize(javax.json.JsonValue value)
SerializercanDeserialize in interface Serializervalue - The JsonValue to be deserialized.public javax.json.JsonValue toJson(java.lang.Object object)
SerializerSerializer.canSerialize(Class)toJson in interface Serializerobject - The object to be serialized.public java.lang.Object fromJson(javax.json.JsonValue json)
SerializerSerializer.canDeserialize(JsonValue)fromJson in interface Serializerjson - The JsonValue to be deserializedpublic void incrementLevel()
SerializerSerializer.decrementLevel().incrementLevel in interface Serializerpublic void decrementLevel()
SerializerSerializer.incrementLevel().decrementLevel in interface Serializer