'Map to a different type using ObjectMapper
I have a piece of code.
I need to map employeeRows to List<Map<String, Object>> using ObjectMapper to pass it as an argument in createResponse method.
Could someone help me with this?
Publisher<employee> employeeRows = employeeService.list();
// Create response with our results
return createResponse(request, employeeRows, pivotValues);
Solution 1:[1]
I think that this question is similar to: Map JSON To List<Map<<String, Object>> As the answer states you can use TypeReference to achieve mapping into List<Map<String,Object>>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Panos Antonatos |
