(转)解决fasterxml中string字符串转对象json格式错误问题(无引号 单引号问题)
原文地址:解决fasterxml中string字符串转对象json格式错误问题
com.fasterxml.jackson.databind.ObjectMapper mapper = new com.fasterxml.jackson.databind.ObjectMapper(); //允许使用未带引号的字段名 mapper.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true); //允许使用单引号 mapper.configure(Feature.ALLOW_SINGLE_QUOTES, true); mapper.readValue(字符串, javabean.class);
懦夫从不启程,弱者溺与途中,只剩我们前行~