title: Passing Json to Rest and receiving it through JSONObject
body: <p>I am having the following server side code:-</p>
  
  <pre><code>    import org.json.JSONObject;
      @Path("/user")
      public class Users {
  
      @POST
      @Path("register")
      @Produces(MediaType.APPLICATION_JSON)
      @Consumes(MediaType.APPLICATION_JSON)
      public Response registerUser(JSONObject userDetails) {
          return Response.status(Status.ACCEPTED).entity("User Created.Details are: " + userDetails).build();
      }
  }
  </code></pre>
  
  <p>Once I tried to call this using the following I am getting a 415 error. Can you please let me know what is the way to solve this.</p>
  
  <pre><code>{
      "user_id": "masha@meeshka.com",
      "password": "mashakawa",
  
      "user_profile": {
          "name": "Masha",
          "city": "New York",
          "email": "maasha@kawa.com",
          "age": 20
      },
  
      "user_settings": {
          "phone_number": "+91898342123"
      }
  }
  </code></pre>
  
  <p>By the way i am using Jersey. </p>