Class JodaSerializers.DateTimeSerializer

    • Constructor Detail

      • DateTimeSerializer

        public DateTimeSerializer()
    • Method Detail

      • serialize

        public void serialize​(org.joda.time.DateTime value,
                              JsonGenerator jgen,
                              SerializerProvider provider)
                       throws java.io.IOException,
                              JsonGenerationException
        Description copied from class: JsonSerializer
        Method that can be called to ask implementation to serialize values of type this serializer handles.
        Specified by:
        serialize in class SerializerBase<org.joda.time.DateTime>
        Parameters:
        value - Value to serialize; can not be null.
        jgen - Generator used to output resulting Json content
        provider - Provider that can be used to get serializers for serializing Objects value contains, if any.
        Throws:
        java.io.IOException
        JsonGenerationException
      • getSchema

        public JsonNode getSchema​(SerializerProvider provider,
                                  java.lang.reflect.Type typeHint)
        Description copied from class: SerializerBase
        Note: since Jackson 1.9, default implementation claims type is "string"
        Specified by:
        getSchema in interface SchemaAware
        Overrides:
        getSchema in class SerializerBase<org.joda.time.DateTime>
        Parameters:
        provider - The serializer provider.
        typeHint - A hint about the type.
        Returns:
        Json-schema for this serializer.