Why writer for media type application/json missing

前端 未结 3 983
无人共我
无人共我 2021-01-14 04:07

Basically I have a restful service (post) that consumes(application/json) and produces (application/json). The single param for this service is an

3条回答
  •  迷失自我
    2021-01-14 04:38

    Raman is correct. Jettison is a valid option. You can also use Jackson. If you are using maven, it is as simple as including the following dependency in you pom:

        
            org.jboss.resteasy
            resteasy-jackson-provider
            2.3.2.Final
        
    

    At which point you should have no problem writing code such as:

        SomeBean query = new SomeBean("args")
        request.body("application/json", query);
        ClientResponse response = request.post();
    

提交回复
热议问题