0
点赞
收藏
分享

微信扫一扫

json 泛型对象的序列化 parseObject by TypeReference

public static T parseObject(String text,TypeReference type,Feature... features) {
return parseObject(text, type.type,ParserConfig.global,DEFAULT_PARSER_FEATURE, features);
}

用法示例:

TypeReference>>MAP_TYPE_REFERENCE =new TypeReference>>(){};
JSON.parseObject(text,MAP_TYPE_REFERENCE);
举报

相关推荐

0 条评论