次のような JSONObject があります。
  {
   "name": "John",
   "details": [
      [
       "phone",
       123456789
      ],
      [
       "address",
       "abcdef"
      ]
   ]
}
上記のjSONを次のオブジェクトにマップしようとしています:
 @JsonIgnoreProperties(ignoreUnknown = true)
 public class Employee{
       String name;
       List<List<DetailItem>> details;
       public String getName() {
       return name;
       }
       public void setName(String name) {
      this.name = name;
       }
       public List<List<DetailItem>> getDetails() {
      return details;
       }
       public void setDetails(List<List<DetailItem>> details) {
      this.details = details;
       }
    }
     @JsonSubTypes({
       @JsonSubTypes.Type(value=String.class),
       @JsonSubTypes.Type(value=Integer.class)
       })
    public class DetailItem{
    }
以下を使用したマッピング:
     ObjectMapper mapper = new ObjectMapper();
     mapper.readValue(instream, Employee.class)
例外:
com.fasterxml.jackson.databind.JsonMappingException: Can not instantiate value of type [simple type, DetailItem] from String value; no single-String constructor/factory method (through reference chain: Employe["details"])
ポリモーフィック デシリアライゼーションをそのまま実行しようとしていますDetailItem。StringInteger
ありがとう