fastjson:转换对象包含了泛型

参照官方的方法:

String jsonStr = "[{\"id\":1001,\"name\":\"Jobs\"}]";
List<Model> models = JSON.parseObject(jsonStr, new TypeReference<List<Model>>() {});

在分页组件MyPageInfo中使用:

MyPageInfo<EntityBaseLogAudit> myPageInfo = JSON.parseObject(strPostResult,
     new TypeReference<MyPageInfo<EntityBaseLogAudit>>() {
     });

posted @ 2022-09-06 14:36  huiy_小溪  阅读(149)  评论(0编辑  收藏  举报