Annotation Interface JsonbDateFormat


Annotation provides way how to set custom date format to field or JavaBean property.

The pattern format is specified in DateTimeFormatter

Usage

The @JsonbDateFormat annotation can be used with the following program elements:

  • field
  • getter/setter
  • type
  • parameter
  • package
Since:
JSON Binding 1.0
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Custom Locale to use.
    Specifies the date pattern to use.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Value that indicates the default format.
    static final String
    Value that indicates that default Locale.
    static final String
    Special date format which serializes given date as milliseconds.
  • Field Details

    • DEFAULT_LOCALE

      static final String DEFAULT_LOCALE
      Value that indicates that default Locale.
      See Also:
    • DEFAULT_FORMAT

      static final String DEFAULT_FORMAT
      Value that indicates the default format.
      See Also:
    • TIME_IN_MILLIS

      static final String TIME_IN_MILLIS
      Special date format which serializes given date as milliseconds. Such date is serialized as a number.
      See Also:
  • Element Details

    • value

      String value
      Specifies the date pattern to use.
      Returns:
      Date pattern to use.
      Default:
      "##default"
    • locale

      String locale
      Custom Locale to use.
      Returns:
      Locale to use.
      Default:
      "##default"