java.time.Instant

13 views
Skip to first unread message

Glenn Caccia

unread,
Oct 22, 2021, 12:38:23 AM10/22/21
to REST assured

I have a POJO that has a field of type java.time.Instant. If I try to use rest-assured for a POST call with the POJO as body, the call fails. Looking at the JSON body in the failed request, it has converted the field into...

"fieldForDate": { "seconds": -1424119832, "nanos": 0 },

whereas I was expecting it to convert it into a UTC time string like "1935-11-13T03:18:00Z".

Is there a way to get this to work?

Reply all
Reply to author
Forward
0 new messages