我从服务器获取此Json响应如何解析json字符串
{
"results": {
"status": "true",
"message": "Successfully Get Data",
"PdfData": {
"Pdf_Result": [{
"Pdf_File_Name": "aft.pdf",
"Subject_Name": "Maths",
"Subject_Id": "1",
"Chapter_ID": "M1111",
"Chapter_Name": "Relations and Functions",
"Downloaded": "YES"
}, {
"Pdf_File_Name": "date.pdf",
"Subject_Name": "Maths",
"Subject_Id": "1",
"Chapter_ID": "M1112",
"Chapter_Name": "Algebra",
"Downloaded": "YES"
}]
}
}
}
答案 0 :(得分:0)
参见jsonschema2pojo.org网站和Gson图书馆教程
答案 1 :(得分:0)
https://www.javacodegeeks.com/2011/01/android-json-parsing-gson-tutorial.html
本教程将教您如何使用Gson解析Json