public static class Jackson2HalModule.TrueOnlyBooleanSerializer extends com.fasterxml.jackson.databind.ser.std.NonTypedScalarSerializerBase<Boolean>
JsonSerializer
to only render Boolean
values if they're set to true.Constructor and Description |
---|
TrueOnlyBooleanSerializer() |
Modifier and Type | Method and Description |
---|---|
void |
acceptJsonFormatVisitor(com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper visitor,
com.fasterxml.jackson.databind.JavaType typeHint) |
com.fasterxml.jackson.databind.JsonNode |
getSchema(com.fasterxml.jackson.databind.SerializerProvider provider,
Type typeHint) |
boolean |
isEmpty(Boolean value) |
void |
serialize(Boolean value,
com.fasterxml.jackson.core.JsonGenerator jgen,
com.fasterxml.jackson.databind.SerializerProvider provider) |
serializeWithType
createObjectNode, createSchemaNode, createSchemaNode, findConvertingContentSerializer, findPropertyFilter, getSchema, handledType, isDefaultSerializer, wrapAndThrow, wrapAndThrow
public boolean isEmpty(Boolean value)
isEmpty
in class com.fasterxml.jackson.databind.JsonSerializer<Boolean>
public void serialize(Boolean value, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException, com.fasterxml.jackson.core.JsonGenerationException
serialize
in class com.fasterxml.jackson.databind.ser.std.StdSerializer<Boolean>
IOException
com.fasterxml.jackson.core.JsonGenerationException
public com.fasterxml.jackson.databind.JsonNode getSchema(com.fasterxml.jackson.databind.SerializerProvider provider, Type typeHint)
getSchema
in interface com.fasterxml.jackson.databind.jsonschema.SchemaAware
getSchema
in class com.fasterxml.jackson.databind.ser.std.StdScalarSerializer<Boolean>
public void acceptJsonFormatVisitor(com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper visitor, com.fasterxml.jackson.databind.JavaType typeHint) throws com.fasterxml.jackson.databind.JsonMappingException
acceptJsonFormatVisitor
in interface com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
acceptJsonFormatVisitor
in class com.fasterxml.jackson.databind.ser.std.StdScalarSerializer<Boolean>
com.fasterxml.jackson.databind.JsonMappingException
Copyright © 2012-2015–2015 Pivotal, Inc.. All rights reserved.