When upgrading a rest service from JEE7 to jakarta.jakartaee-api (v 10.0.0) there is an unwanted change in format of java.sql.Timestamp timestamps. The timestamps used to be like this
{"timestamp": 1568281963809}
but now they are like this
{"timestamp": "2019-09-12T10:52:43.808Z[UTC]"}
In the java code the json response is generated simply like this:
return Response.ok(someDto).build();
The parameter someDto is a java object that has many fields including some Timestamps. The json is otherwise just fine, but the timestamps have this wrong string format. The clients that are calling the rest interface do not like the formatted string at all as they are expecting an integer value.
What is the best and easiest way to change the format back as it was? It should be the default?