Java String转List

1.String数组转List

	public static void main(String[] args) throws JsonParseException, JsonMappingException, IOException {
  		String str= "[{\"YHDM\":\"xs126032\",\"ZSXH\":null,\"XM\":\"小飞侠\"}]";
		ObjectMapper mapper = new ObjectMapper();
  		List<Map<String,String>> conList = mapper.readValue(str, List.class);
  		System.out.println(conList.size());
	}
相关推荐
©️2020 CSDN 皮肤主题: 技术黑板 设计师:CSDN官方博客 返回首页