我正在尝试将 Json String 转换为 HashMap 但它不起作用。我的代码:
ObjectMapper mapper = new ObjectMapper();
Map<String,Object> map = mapper.readValue("Json String placeholder", Map.class);
我得到以下异常:
java.lang.NoClassDefFoundError: com/fasterxml/jackson/annotation/JsonAutoDetect
at com.fasterxml.jackson.databind.introspect.VisibilityChecker$Std.<clinit>(VisibilityChecker.java:172)
at com.fasterxml.jackson.databind.ObjectMapper.<clinit>(ObjectMapper.java:195)
.....
我究竟做错了什么?还有另一种可能转换它吗?还是缺少什么?