title: Passing Object and Integer with JSON
body: <p>I want to transfer an object with an additional integer to my Jersey-Service.</p>
  
  <p>My service method looks like this:</p>
  
  <pre><code>@POST
  @Path("/test")
  @Consumes("application/json")
  public void test(Person pers, int number)
  </code></pre>
  
  <p>and the Json in the body looks like this:</p>
  
  <pre><code>{
  "name":"TEST",
  "surname":"TEST",
  "number":"1000"
  }
  </code></pre>
  
  <p>It works without the additional integer.</p>
  
  <p>So I think it must be a wrong JSON message?</p>
  
  <p><strong>BTW:</strong> the number is indepentent from the object, so I cannot integrate this var into the person-class.</p>
  
  <p>Please can someone help me?</p>
  
  <p>best regards</p>