How to convert Http.RequestBody to JSON/String

Hi guys,

I am using own databae api loger of all requests to our API.
Is possible somehow map RequestBody object without specify content type?

What I want: log all types of requests - now I have mapper for json, form, text.
But if someone tried request without specified content-type I want to know.

com.fasterxml.jackson.databind.ObjectMapper throw JsonProcessingException:

ObjectMapper mapper = new ObjectMapper();
body = mapper.writeValueAsString(req.body());
System.out.println(ctx.request().body());

Thanks for ideas!

Hi @landsman
See https://www.playframework.com/documentation/2.8.x/JavaJsonActions