ObjectMapper mapper = new ObjectMapper();
mapper.configure(JsonParser.Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);
我在构造函数下从 intellij 收到错误和编译器警告,并且在尝试编译时说
java: no suitable method found for configure(org.codehaus.jackson.JsonParser.Feature,boolean) method
(actual argument org.codehaus.jackson.JsonParser.Feature cannot be converted to com.fasterxml.jackson.core.JsonGenerator.Feature by method invocation conversion)
此方法及其具有这些参数的构造函数也出现并且可用于智能感知。
谁能想到这种废话的原因?
感谢您的帮助,我似乎真的无法弄清楚问题所在。
-亚当