Annotation Type JsonIgnore


  • @Target({CONSTRUCTOR,METHOD,FIELD})
    @Retention(RUNTIME)
    @Inherited
    @Documented
    public @interface JsonIgnore
    You can annotate with @JsonIgnore the methods, fields and creators that must be ignored during serialization AND deserialization. To exclude property from only deserialization and keep it during serialization use @JsonIgnore(serialize=true), for example if you annotate a field with @JsonIgnore(serialize=true,deserialize=true) it will have no effect!
    Author:
    Eugen Cepoi
    See Also:
    JsonProperty
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean deserialize
      Whether to include this property in deserialization.
      boolean serialize
      Whether to include this property in serialization.
    • Element Detail

      • serialize

        boolean serialize
        Whether to include this property in serialization. False by default, the property won't be serialized.
        Default:
        false
      • deserialize

        boolean deserialize
        Whether to include this property in deserialization. False by default, the property won't be deserialized.
        Default:
        false