I am upgrading from Jersey1.x to Jersey2.x. The REST web-service has a List<List<String>>
which with 1.x was returning the response as:
"values" :[
[
"Value1_1",
"Value1_2",
"Value1_3"
],
[
"Value2_1",
"Value2_2",
"Value2_3"
],
[
"Value3_1",
"Value3_2",
"Value3_3"
]
]
With 2.x, it flattens out the inner list and response shows up as:
"values" : [
"Value1_1 Value1_2 Value1_3",
"Value2_1 Value2_2 Value2_3",
"Value3_1 Value3_2 Value3_3"
]
(@JsonUnwrapped has not been added).
Assuming that we have to continue working with this type which produces a list if strings (and not change to List which produces a list of objects), how can we achieve a similar output.