String typeIdsList=cdoRequest.getStringValue("typeIds"); ObjectMapper objectMapper = new ObjectMapper(); List<Map<String, String>> typeIdLists = objectMapper .readValue(typeIdsList,List.class); 谁能给我讲讲objectMapper 此处的用法呀??找了半天还不是很理解。谢谢
Copyright 2014-2024 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
这个应该是Jackson中的序列化反序列化器,功能就是在Java对象与json字符串直接转换,与内部调用了Jackson 的解析反解析器。这段代码的首先将json字符串从http req中取出,之后将json字符串反序列化为list对象