求大神解答:
从服务器获取了一段json,现在要转成bean.
上代码:
public static Object Json2Gson( Class<?> clz,String jsonString) throws IOException {
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
return objectMapper.readValue(jsonString, clz);
}
但是解析报错了:
cn.serviceforce.cssdk.jackson.databind.JsonMappingException:
Conflicting setter definitions for property "imagePath":
android.graphics.Bitmap#setImagePath(1 params)
vs android.graphics.Bitmap#setImagePath(1 params)
什么原因呢,求大神解答啊