skip to Main Content

Json – Why LocalDateTime is serialized as array when return as ReponseBody in springboot?

I want to get the dates in a format of dd/MM/yyyy so,I wrote this code first: @GetMapping("/testAjax.json") public ResponseBody<?> AjaxResponse testAjax(){ AjaxResponse response = new AjaxResponse(); DateTimeTest test = new DateTimeTest(); test.setDateTime(LocalDateTime.now()); response.addResponse("date", LocalDateTime.now()); response.addResponse("test", test); return response; }` and…

VIEW QUESTION
Back To Top
Search