Annotation Interface JsonbTransient


Prevents serialization and/or deserialization of JSON properties.

Usage

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

  • field: prevents serialization and deserialization
  • getter: prevents serialization
  • setter: prevents deserialization
  • record component: prevents serialization and deserialization
  • record component accessor: prevents serialization
  • record virtual attribute: prevents serialization

@JsonbTransient is mutually exclusive with all other JSON Binding defined annotations. This behavior is enforced by throwing a JsonbException during serialization and/or deserialization when the following combinations of annotations are present:

Conditions under which a JsonbException is thrown
@JsonbTransient placement Additional annotation that triggers exception
field any other JSON Binding annotation on the same field, its getter, or its setter
getter any other JSON Binding annotation on the corresponding field or the same getter (setter is unaffected)
setter any other JSON Binding annotation on the corresponding field or the same setter (getter is unaffected)
record component any other JSON Binding annotation on the same component or its accessor
record component accessor any other JSON Binding annotation on the corresponding component or the same accessor
record virtual attribute any other JSON Binding annotation on the same virtual attribute
Since:
JSON Binding 1.0