title: Spring Boot @RequestBody parses only 0/null values?
body: <p>I have a POJO "Problem" object:</p>
  
  <pre><code>import lombok.Data;
  
  @Data
  public class Problem {
      int capacity;
      int weights[];
      int values[];
  }
  </code></pre>
  
  <p>Which I am trying to parse in a Rest controller in Spring Boot:</p>
  
  <pre><code>@RequestMapping(value = "/calculate", method = RequestMethod.POST)
  public SolutionResponse calculateSolution(@RequestBody Problem problem) {
  // problem = Problem(capacity=0, weights=null, values=null) ??
  // Goes on ..
  }
  </code></pre>
  
  <p>I am posting the following with cURL:</p>
  
  <pre><code>curl -d '{"problem": {"capacity": 60, "weights": [5, 2, 22], "values": [2, 5, 30]}}' -H "Content-Type: application/json" -X POST http://localhost:8088/endpoint/calculate
  </code></pre>
  
  <p>Looking into debug mode, it is indeed parsed, but as:</p>
  
  <pre><code>problem = Problem(capacity=0, weights=null, values=null)
  </code></pre>
  
  <p>So, it's wrong as they should have the values that I posted.</p>
  
  <p>What could be the issue?</p>