java报错 "JSON parse error: Cannot construct instance of `java.util.ArrayList` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value (''); nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `java.util.ArrayList` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('')\n at [Source: (PushbackInputStream); line: 1, column: 1981] (through reference chain: com.icbccs.dragonfly.model.DTO.base.DFSUser_DTO[\"oaDeptList\"])" }
因为fastjson 在json解析的的时候 无法将''转换成jsonarray。需要[]才能转换。
解决方法:
其中一种简单解决方案:
private List<xxx> xxxList = new ArrayList<>();