TYPE - the java type serialized by this interfacepublic interface JsonTypeSerializer<TYPE>
JsonTransformer.registerSerializer(JsonTypeSerializer) method.| Modifier and Type | Method and Description |
|---|---|
Class<TYPE> |
getType()
This method should return with the java type.
|
String |
serialize(TYPE source,
JsonSerializer context)
This method receives a java object and should serialize it into a JSON string.
|
String serialize(TYPE source, JsonSerializer context) throws TransformerException
context to serialize another objects.source - the object to serializecontext - a context object which can be used to serialize another objectsTransformerException - if the serialization is not possibleCreated by Kornél Simon, 2022