title: @RequestBody mapping complex json object
body: <p>I need to convert below json to java object of @RequestBody.</p>
  
  <pre><code>{
      "entity": {
          "id": 3,
          "name": "james"
      },
      "conjunction": "OR",
      "conditions": [
          {
              "operation": "equalTo",
              "dataKey": "department",
              "dataType": "string",
              "value": "abc"
          },
          {
              "operation": "notEqualTo",
              "dataKey": "ID",
              "dataType": "number",
              "value": "100"
          },
          {
              "operation": "notEqualTo",
              "dataKey": "name",
              "dataType": "strubg",
              "value": "jack"
          },
          {
              "operation": "between",
              "dataKey": "END_DATE",
              "dataType": "date",
              "value1": "20180502",
              "value2": "20180519"
          }
      ]
  }
  </code></pre>
  
  <p>The first three element in the array correspond to below java object.</p>
  
  <pre><code>public class ComparisonCondition extends Condition {
      private String value;
  }
  </code></pre>
  
  <p>The last element correspond below object.</p>
  
  <pre><code>public class BetweenCondition extends Condition {
      private String value1;
      private String value2;
  }
  </code></pre>
  
  <p>They all inherit from below object.</p>
  
  <pre><code>public class Condition {
      private String dataKey;
      private String dataType;
      private String operation;
  }
  </code></pre>
  
  <p>The spring mvc method is below.</p>
  
  <pre><code>@RequestMapping(value = RequestAction.FILTER, method = RequestMethod.POST)
  public List&lt;Student&gt;  filter(
          @RequestBody  Filter&lt;Student&gt; filterConfig) {   
      return null;
  
  }
  </code></pre>
  
  <p>The Filter object is below.</p>
  
  <pre><code>public class Filter&lt;T&gt; {
      private String conjunction;
      private T entity;
      private List&lt;Condition&gt; conditions;
  }
  </code></pre>
  
  <p>How can I map the json to java object successfully?
  Currently it report <code>"Could not read JSON: Unrecognized field "value" (class com.ssc.rest.entity.Condition), not marked as ignorable (3 known properties: "dataType", "dataKey", "operation"])</code></p>