开发者社区> 问答> 正文

像下面这样复杂格式的Json,用JSON-lib或者Gson怎么转换成Java对象,求好心人指教

{
 "facets":{},
 "hits":{
 "hits":[
 {"_source":
 {"author":"侯振清%刘洋%王鑫娟%张其清","ffund":"厦门大学基金","firstauthor":"侯振清","lid":"A","refyear":"2013","ref":"^A2013^B1","lW_ORGID":"UA35001"},
 "_id":"LW200800383289",
 "_index":"cstpcd_chn_lw2",
 "_type":"chnlw"
 },
 {"_source":{"author":"童惠娟%洪宗国%钟益声","ffund":null,"firstauthor":"洪宗国","lid":"A","refyear":null,"ref":null,"lW_ORGID":"UA42008"},"_id":"LW200600411391","_index":"cstpcd_chn_lw2","_type":"chnlw"}
    ],
"total":34807
},


"hitsCount":34807,
 "took":"20"
 }

展开
收起
杨冬芳 2016-07-05 16:09:38 2292 0
1 条回答
写回答
取消 提交回答
  • IT从业

    建议你用fastJson 号称世界上解析json最快的类库,支持按模型 讲json 转化为java 对象。具体功能可以自己查查 fastJson的官方文档,例子很丰富

    2019-07-17 19:51:34
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Spring Cloud Alibaba - 重新定义 Java Cloud-Native 立即下载
The Reactive Cloud Native Arch 立即下载
JAVA开发手册1.5.0 立即下载