Annotation Interface MarshalledIgnore


Skip a type entirely during marshalling.

Serializers output null for instances of the annotated type and parsers return null when asked to instantiate it. This is a marshalling-layer concern: the wire format renders the value as null regardless of what (if anything) the bean-modeling layer would do with the type.

Bean-modeling decisions are controlled by the sibling annotation @BeanIgnore (in juneau-commons), which is responsible for excluding classes from bean detection ("this isn't a bean — fall through to swap/@Marshalled(as=STRING)/etc.") and for excluding fields, methods, and constructors from bean property/constructor detection.

The two annotations are independent and may be combined:

  • @MarshalledIgnore alone — the class still participates in bean detection (it may be treated as a bean by the modeling layer) but the marshaller emits null.
  • @BeanIgnore alone — the class is not a bean for modeling purposes, but the marshaller still tries to render it (typically via toString() or an installed swap).
  • Both — the class is not a bean and the marshaller emits null.
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Optional description for the exposed API.
  • Element Details

    • description

      Optional description for the exposed API.
      Returns:
      The annotation value.
      Since:
      9.2.0
      Default:
      {}