Sorry, sending again since the code sample seems to have been shrunk with the 
kids:

I've just inherited a badly written Angular/JAX-RS application and I'd like to 
replace the JAX-RS part with Stripes. However JAX-RS seems to do a nice job 
reading JSON body requests and returning JSON responses e.g.:

var data = {
    abc: "My ABC arg",
    xyz: "My XYZ arg",
};
$http.post("/somePath", data).success(function (response) {
    // handle response
}

@POST()
@Path("/somePath")
@Produces(MediaType.APPLICATION_JSON)
public Response loadSomething(SomeParams params){
    SomeEntity entity = springBean.loadSomeEntity(params.getAbc(), 
params.getXyz());
    return Response.ok().entity(entity).build();
}


Back when I was using Stripes a few years ago, I threw together a way to Read 
JSON Requests with Stripes 1.5 and I am hoping that Stripes now handles this.
After a quick look, I haven't seen a way read a JSON post request into a 
Stripes ActionBean.
Does Stripes now handle this? Is anyone else using JSON with Stripes in a 
better way that I did in the past?

Thanks Dave
  
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to