JSON consumer of polymorphic objects
Thanks to Eric’s comment pointing me to programmerbruce I managed to crack it. Here’s the code I used (cut down to simplify). public static class Info { @JsonProperty(“Product”) public String product; // Empty in the 0d version, One entry in the 1d version, two entries in the 2d version. @JsonProperty(“Dimensions”) public String[] dimensions; } public … Read more