I have a spring application with a requestmapping that returns a list of Accounts in json. The Account class has a Date property. This property is returned as a unix timestamp in the json output.
Is there a way to change the dateformat to a predefined format instead of returning it as a unix timestamp?
@RequestMapping(value = "/userAccounts.json", method = RequestMethod.GET)
public @ResponseBody ArrayList<Account> userAccounts() {
ArrayList<Account> accounts = accountService.getAllUserAccounts(user);
return accounts;
}