public class JsonSerializableSerializer extends java.lang.Object implements Serializer
Constructor and Description |
---|
JsonSerializableSerializer() |
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)
Serializer
canSerialize
in interface Serializer
clazz
- The class of the object to be serialized.public boolean canDeserialize(javax.json.JsonValue value)
Serializer
canDeserialize
in interface Serializer
value
- The JsonValue to be deserialized.public javax.json.JsonValue toJson(java.lang.Object object)
Serializer
Serializer.canSerialize(Class)
toJson
in interface Serializer
object
- The object to be serialized.public java.lang.Object fromJson(javax.json.JsonValue json)
Serializer
Serializer.canDeserialize(JsonValue)
fromJson
in interface Serializer
json
- The JsonValue to be deserializedpublic void incrementLevel()
Serializer
Serializer.decrementLevel()
.incrementLevel
in interface Serializer
public void decrementLevel()
Serializer
Serializer.incrementLevel()
.decrementLevel
in interface Serializer