cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Returning JSON with Web Services

0 Likes
1,676

If I were to hit this end point with the platformwebservices brought into my project it returns XML. Is there a parameter I can pass that would allow this to return JSON?

http://localhost:9001/ws410/rest/countries

I'm on hybris 6.1 if that matters too.

View Entire Topic
Former Member
0 Likes

@RequestMapping(value = "/rest/countries", method = RequestMethod.GET, produces = { MediaType.APPLICATION_JSON_VALUE })

Former Member
0 Likes

include in your request mapping.

0 Likes

But isn't that request mapping in hybris OOTB code? Are you suggesting to override where ever (platformwebservices) this method is to my own custom stuff? So I would have to override the whole extension to get all the endpoints available in JSON?