This is a follow up question to this question:
sending nested json object using postman
I am trying to send a Json object to a Jersey web service using Postman.
I am doing it like this:
On the Jersey side:
@Path("/testMethod")
@POST
@UnitOfWork
public short testMethod(@NotNull @BeanParam Test test)
{ ... }
Test class is a simple class:
public class Test
{
public String field;
public Test()
{
}
}
On the postman side I'm sending a POST message with Body set as raw and the content type is set as Json(application/json). The body itself is:
{
"field" : "12"
}
When sending this request, the field
in the received parameter is null... why is that?