java.lang.Object
org.eclipse.yasson.internal.serializer.NullSerializer
- All Implemented Interfaces:
ModelSerializer
Null value serializer. Determines proper behavior when the serialized value is null.
-
Constructor Summary
ConstructorsConstructorDescriptionNullSerializer(ModelSerializer delegate, Customization customization, JsonbContext jsonbContext) Create new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidserialize(Object value, jakarta.json.stream.JsonGenerator generator, SerializationContextImpl context) Serialize provided value or delegate serialization to the next serializer.
-
Constructor Details
-
NullSerializer
public NullSerializer(ModelSerializer delegate, Customization customization, JsonbContext jsonbContext) Create new instance.- Parameters:
delegate- non-null value delegatecustomization- component customizationjsonbContext- jsonb context
-
-
Method Details
-
serialize
public void serialize(Object value, jakarta.json.stream.JsonGenerator generator, SerializationContextImpl context) Description copied from interface:ModelSerializerSerialize provided value or delegate serialization to the next serializer.- Specified by:
serializein interfaceModelSerializer- Parameters:
value- value to be serializedgenerator- json generatorcontext- serialization context
-