Annotation Type Json.Ignore

Enclosing class:
Json

@Retention(CLASS) @Target(FIELD) public static @interface Json.Ignore
Exclude the property from serialization, deserialization or both.

We can explicitly use deserialize=true to include the property in deserialization but not serialization. For example, we might do this on a property that represents a secret like a password.

We can explicitly use serialize=true to include the property in serialization but not deserialization.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Set this explicitly to true to include in deserialization.
    boolean
    Set this explicitly to true to include in serialization.
  • Element Details

    • serialize

      boolean serialize
      Set this explicitly to true to include in serialization.
      Default:
      false
    • deserialize

      boolean deserialize
      Set this explicitly to true to include in deserialization.
      Default:
      false