import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.core.type.TypeReference;
String jsontype = "{\"aboutApp\":\"datebook.cc\"}";
Map<String, Object> map = new HashMap<String, Object>();
ObjectMapper mapper = new ObjectMapper();
try{
map = mapper.readValue(jsontype, new TypeReference<HashMap<String,Object>>(){});
}catch(Exception e){
e.printStackTrace();
}
string(json)转map
最新推荐文章于 2024-03-12 09:16:52 发布