Class Id.IdSerializer
java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<Id<?>>
io.fluxzero.sdk.modeling.Id.IdSerializer
- All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable, com.fasterxml.jackson.databind.ser.ContextualSerializer
public static class Id.IdSerializer
extends com.fasterxml.jackson.databind.JsonSerializer<Id<?>>
implements com.fasterxml.jackson.databind.ser.ContextualSerializer
Writes concrete ID properties as scalars and polymorphic properties with a recoverable type discriminator.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer
com.fasterxml.jackson.databind.JsonSerializer.None -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.JsonSerializer<?> createContextual(com.fasterxml.jackson.databind.SerializerProvider provider, com.fasterxml.jackson.databind.BeanProperty property) voidserialize(Id<?> value, com.fasterxml.jackson.core.JsonGenerator generator, com.fasterxml.jackson.databind.SerializerProvider provider) voidserializeWithType(Id<?> value, com.fasterxml.jackson.core.JsonGenerator generator, com.fasterxml.jackson.databind.SerializerProvider provider, com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSerializer) Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer
acceptJsonFormatVisitor, getDelegatee, handledType, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, unwrappingSerializer, usesObjectId, withFilterId, withIgnoredProperties
-
Method Details
-
createContextual
public com.fasterxml.jackson.databind.JsonSerializer<?> createContextual(com.fasterxml.jackson.databind.SerializerProvider provider, com.fasterxml.jackson.databind.BeanProperty property) throws com.fasterxml.jackson.databind.JsonMappingException - Specified by:
createContextualin interfacecom.fasterxml.jackson.databind.ser.ContextualSerializer- Throws:
com.fasterxml.jackson.databind.JsonMappingException
-
serialize
public void serialize(Id<?> value, com.fasterxml.jackson.core.JsonGenerator generator, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException - Specified by:
serializein classcom.fasterxml.jackson.databind.JsonSerializer<Id<?>>- Throws:
IOException
-
serializeWithType
public void serializeWithType(Id<?> value, com.fasterxml.jackson.core.JsonGenerator generator, com.fasterxml.jackson.databind.SerializerProvider provider, com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSerializer) throws IOException - Overrides:
serializeWithTypein classcom.fasterxml.jackson.databind.JsonSerializer<Id<?>>- Throws:
IOException
-