fastjson与jackson解析json数据对比
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
/*
*json字符串数据
* { //json对象,无key(键)
"code": 200,
"curTime": 1647840792931,
"data": {//json对象,key(键):即该json对象名字叫data
"total": "3196",
"list": [//json数组,Key(键):即该json数组名字叫list
{
"musicrid": "MUSIC_202132722",
"barrage": "0",
"artist": "等什么君(邓寓君)&FOX胡天渝",
"mvpayinfo": {
"play": "0",
"vid": "13703837",
"download": "0"
},
"isstar": 0,
"rid": 202132722,
"album": "予·君",
"albumid": "24792577",
"name": "踏雪",
"payInfo": {
"play": "1100",
"overseas_nplay": "11111",
"feeType": {
"song": "1",
"album": "0",
"vip": "1",
"bookvip": "0"
}
}
},....还有...
]
},
"msg": "success",
"profileId": "site",
"reqId": "f2d9674487bfba85c5dbb6234ffe67fd",
"tId": ""
}
*
* */
public class Test