spring json writes more json then i want
Posted
by
mkoryak
on Stack Overflow
See other posts from Stack Overflow
or by mkoryak
Published on 2010-12-31T18:46:36Z
Indexed on
2010/12/31
18:54 UTC
Read the original article
Hit count: 260
spring-mvc
|spring-json
I am using the json spring view in order to return a simple JSON object from my controller.
The problem is that its returning more data then i want. it is returning the validation errors and things inside of my model when all i am doing is this in the controller:
Map model = new HashMap()
model.put("success", "true");
return new ModelAndView("jsonView", model);
If you look at the bottom of this page in the docs it looks like i am getting back data that POST would return. i am not doing a post, i am doing a GET by going directly to the URL with params.
How do i get this lib to return just the data in my model?
© Stack Overflow or respective owner