Module jakarta.json.bind
Package jakarta.json.bind.annotation
Annotation Interface JsonbNumberFormat
@JsonbAnnotation
@Retention(RUNTIME)
@Target({ANNOTATION_TYPE,FIELD,METHOD,TYPE,PARAMETER,PACKAGE})
public @interface JsonbNumberFormat
Annotation provides way how to set custom number format to field or JavaBean property.
The pattern format is specified in DecimalFormat
Usage
The @JsonbNumberFormat annotation can be used with the following program elements:
- field
- getter/setter
- type
- parameter
- package
Note that even when specifying a pattern, the format of the JSON value also depends on the Locale.
For best portability it is recommended to either specify the locale() or define a default Locale
for JSON-B via JsonbConfig.withLocale(java.util.Locale).
- Since:
- JSON Binding 1.0
-
Field Details
-
DEFAULT_LOCALE
Value that indicates that defaultLocale.- See Also:
-
-
Element Details