Skip to content

@JsonIgnoreProperties

JonathanO edited this page Jun 2, 2012 · 1 revision

JsonIgnoreProperties

The de-serializer will normally log warnings when it encounters properties in the JSON that it does not know how to de-serializer. This annotation allows you to suppress these warnings, either for a named set of fields, or for all unknowns.

Parameters

  1. names (string[]) Array of properties to ignore
  2. ignoreUnknown (bool) If true then ignore all unknown properties (defaults to false)

Example

Ignore properties named a, b and c.

<?
/**
 * @JsonIgnoreProperties(names={"a", "b", "c"})
 */
class Foo {

Back to Annotations list

Clone this wiki locally