public final class PeriodSerializer
extends com.fasterxml.jackson.databind.ser.std.StdSerializer<T>
ReadablePeriod
using Joda default formatting.
TODO: allow serialization as an array of numbers, for numeric ("timestamp") notation?
Modifier and Type | Field and Description |
---|---|
protected org.joda.time.format.PeriodFormatter |
defaultFormat |
Constructor and Description |
---|
PeriodSerializer() |
Modifier and Type | Method and Description |
---|---|
com.fasterxml.jackson.databind.JsonNode |
getSchema(com.fasterxml.jackson.databind.SerializerProvider provider,
Type typeHint) |
void |
serialize(org.joda.time.ReadablePeriod value,
com.fasterxml.jackson.core.JsonGenerator jgen,
com.fasterxml.jackson.databind.SerializerProvider provider) |
void |
serializeWithType(T value,
com.fasterxml.jackson.core.JsonGenerator jgen,
com.fasterxml.jackson.databind.SerializerProvider provider,
com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer) |
acceptJsonFormatVisitor, createObjectNode, createSchemaNode, createSchemaNode, findConvertingContentSerializer, findPropertyFilter, getSchema, handledType, isDefaultSerializer, wrapAndThrow, wrapAndThrow
public void serialize(org.joda.time.ReadablePeriod value, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
serialize
in class com.fasterxml.jackson.databind.ser.std.StdSerializer<org.joda.time.ReadablePeriod>
IOException
com.fasterxml.jackson.core.JsonProcessingException
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.StdSerializer<org.joda.time.ReadablePeriod>
public void serializeWithType(T value, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider, com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
serializeWithType
in class com.fasterxml.jackson.databind.JsonSerializer<T>
IOException
com.fasterxml.jackson.core.JsonProcessingException
Copyright © 2014. All rights reserved.