I am using spring 3.0 webservices.
It produces a json response.
I want to generate jsonp response using same webservices.
Please suggest how to customize spring 3.0 webservices json response.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can try to integrate Jackson in your project, which has tons of options for JSON serialization. Configuring Jackson is easy:
Once you get this working, you can use Jackson’s excellent annotations on your Model objects to configure how they get printed in the JSON, or if they get ignored (@JSONIgnore).
If you want to go further, you can extend the org.springframework.web.servlet.view.json.MappingJacksonJsonView class with your own, and go nuts.
Hope this helps.