here is my issue:
I have application with REST endpoint. This endpoint returns a list of objects ActiveAdvertisement. With this everything works fine:
I need to reorganize this response and I grouped my data by one of object fields. So now my response should return Map<String, List<ActiveAdvertisement>>.
Now my response looks like this:
Why values list inside this map are not returned as Object but this looks like Object.toString() is used there?
Map is created properly, here is screenshot from debugger:
Here is my code from Controller:
@GET
@Produces(MediaType.APPLICATION_JSON)
public Response getAdvertisements() {
return Response.ok(advertisementAssembler.getAdvertisements())
.header("Access-Control-Allow-Origin", "*")
.header("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT")
.allow("OPTIONS").build();
}


