java.lang.Object
cz.cvut.kbss.jsonld.serialization.serializer.datetime.DateSerializer
All Implemented Interfaces:
Configurable, ValueSerializer<Date>

public class DateSerializer extends Object implements ValueSerializer<Date>
  • Constructor Details

  • Method Details

    • serialize

      public JsonNode serialize(Date value, SerializationContext<Date> ctx)
      Description copied from interface: ValueSerializer
      Serializes the specified value, returning a JSON-LD node representing it.

      Note that if the value is a singular, the returned node should also contain the identifier of the serialized attribute (available through the provided serialization context).

      Specified by:
      serialize in interface ValueSerializer<Date>
      Parameters:
      value - Value to serialize
      ctx - Serialization context
      Returns:
      Serialization result
    • configure

      public void configure(Configuration config)
      Description copied from interface: ValueSerializer
      Applies the specified configuration to this serializer.

      Should be called at the beginning of serialization of an object graph so that potential runtime changes in configuration can be reflected by the serialization process.

      Implementations are free to apply configuration on initialization and rely on the default implementation of this method which does nothing.

      Specified by:
      configure in interface Configurable
      Specified by:
      configure in interface ValueSerializer<Date>
      Parameters:
      config - Configuration to apply