To produce and/or consume JSON, in Rest using spring boot seems to be pretty easy as JACKSON is included in spring-boot-starter-web package (https://spring.io/guides/gs/actuator-service/)
So if spring-boot-starter-web is included, just follow this example as endpoint...
@RequestMapping(value = "/post", method = RequestMethod.POST, produces="application/json", consumes="application/json")
@ResponseBody
public String post(@RequestBody String json) {
POJO pj = new POJO();
ObjectMapper mapper = new ObjectMapper();
try {
pj = mapper.readValue(json, POJO.class);
//do some things with json, put some header information in json
return mapper.writeValueAsString(pj);
}catch(Exception ex) {}
return null;
}