public interface JsonTransformer extends JsonSerializer, JsonDeserializer
During the serialization / deserialization the JSON name of the fields will be the same as in java.
To change that, you can use SerializedName annotation on the java field.
With this interface it is possible to register special JSON serializer / deserializer instances into the entire ibello
- see registerSerializer(JsonTypeSerializer) and registerDeserializer(JsonTypeDeserializer).
| Modifier and Type | Method and Description |
|---|---|
<T> void |
registerDeserializer(JsonTypeDeserializer<T> deserializer)
Registers a deserializer instance into the ibello.
|
<T> void |
registerSerializer(JsonTypeSerializer<T> serializer)
Registers a serializer instance into the ibello.
|
toJson, toJsonfromJson, fromJson, fromJsonToList, fromJsonToList<T> void registerDeserializer(JsonTypeDeserializer<T> deserializer) throws TransformerException
deserializer - the deserializer instance we want to registerTransformerException - if the registration of the deserializer is not possible<T> void registerSerializer(JsonTypeSerializer<T> serializer) throws TransformerException
serializer - the serializer instance we want to registerTransformerException - if the registration of the serializer is not possibleCreated by Kornél Simon, 2022