I have a little bit of a comfort problem using jackson in a rest api. I am using jackson to serialize object that have attributes of any type in java.time like:
public class DomainObject{
public LocalDateTime start;
}
I can use jackson to produce something like this:
{
start: '2017-12-31 17:35:22'
}
And i can use it to produce something like this:
{
start: 102394580192345 //milliseconds
}
But i would like to have both, the milliseconds to workwith in JS and the String representation for Users who use the rest-api purely without js-frontend. (Mostly me, for debugging)
So is there any way, to make jackson produce the following?
{
start: 102394580192345 //milliseconds
startString: '2017-12-31 17:35:22'
}