I have json\'ed array of host, port, uri
tuples encoded by 3rd party as an array of fixed length arrays:
[
[\"www1.example.com\", \"443\", \"/
Consider importing the two dimensional array and then running through a loop. Then you can have a constructor on the Endpoint class that accepts each instance of internal array.
Add following annotation:
@JsonFormat(shape=JsonFormat.Shape.ARRAY)
class Endpoint {
}
and it should serialize entries as you wish.
Also: it'd be safest to then use @JsonPropertyOrder({ .... } )
to enforce specific ordering, as JVM may or may not expose fields or methods in any specific order.