Say I have:
ReportExecution executionRequestBody = new ReportExecution();
I need something to parse the instance in a way that it would be parsed in JSON format but having textual outlook.
String b = JacksonParserParse(executionRequestBody);
Where I would be able to do something like:
logger.info(b);
Output:
{"reportUnitUri": "/path/to/report",
"async": "true",
"freshData": "false",
"saveDataSnapshot": "false",
"outputFormat": "html",
"interactive": "true",
"ignorePagination": "false",
"pages": "1-5"
}
The ultimate task is to simply insert this String into HTTP request body in Spring RestTemplate HttpEntity. So if there is less thorny way I am more than happy to hear alternative.
Now I can do simple mapping but that usually results in .json file in the filesystem which I do not really know how to plug into my HttpEntity.