Annotation Type JsonbDateFormat



  • @JsonbAnnotation
    @Retention(RUNTIME)
    @Target({ANNOTATION_TYPE,FIELD,METHOD,TYPE,PARAMETER,PACKAGE})
    public @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
    • Field Summary

      Fields 
      Modifier and Type Fields Description
      static java.lang.String DEFAULT_FORMAT
      Value that indicates the default format.
      static java.lang.String DEFAULT_LOCALE
      Value that indicates that default Locale.
      static java.lang.String TIME_IN_MILLIS
      Special date format which serializes given date as milliseconds.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String locale
      Custom Locale to use.
      java.lang.String value
      Specifies the date pattern to use.
    • Field Detail

      • DEFAULT_LOCALE

        static final java.lang.String DEFAULT_LOCALE
        Value that indicates that default Locale.
      • DEFAULT_FORMAT

        static final java.lang.String DEFAULT_FORMAT
        Value that indicates the default format.
      • TIME_IN_MILLIS

        static final java.lang.String TIME_IN_MILLIS
        Special date format which serializes given date as milliseconds. Such date is serialized as a number.
    • Element Detail

      • value

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

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