I'm having an unexplained behaviour of Jersey. When serialisation a date as DTO's attribute, I'll get timestamp (that's fine for me). Something like :
Java :
Date day = new Date();
JSon :
{
"day" : 1422831600000
}
But I having a such more complex DTO with a map using Date as key.
Java :
Map<Date, String> mapData = new HashMap<Date, String>();
mapData.put(new Date(), "TEST");
JSON :
{
mapData : {
"2015-02-01T23:00:00.000+0000" : "TEST"
}
}
How can I get simply in the map case the timestamp insteadt of ISO format ?
Thanks.