Android解析JSON格式文字進行資料讀取
Android解析JSON格式文字進行資料讀取
資料來源:http://dean-android.blogspot.tw/2013/06/androidjson.html
1.第一種類型為JSONObject內又包覆一個JSONObject。
//例如Server API回傳的mJSONText文字為下列
{“id”:”1″,”name”:”小黑人”,”title”:”解析JSON格式文字 by 小黑人的Android教室” ,”info”:{“love”:”android”,”color”:”Black黑色”,”say”:”歡迎大家來到小黑人的Android教室 ^^”}}
{
“id”: “1”,
“name”: “小黑人”,
“title”: “解析JSON格式文字 by 小黑人的Android教室”,
“info”: {
“love”: “android”,
“color”: “Black黑色”,
“say”: “歡迎大家來到小黑人的Android教室 ^^”
}
}
———
//建立一個JSONObject並帶入JSON格式文字,getInt取出”id”欄位的數值
int ID = new JSONObject(mJSONText).getInt(“id”);
//建立一個JSONObject並帶入JSON格式文字,getString取出”name”與”title”欄位的數值
String NAME = new JSONObject(mJSONText).getString(“name”);
String TITLE = new JSONObject(mJSONText).getString(“title”);
//所以我們要讀取JSONObject裡的JSONObject資訊就必須解析兩層JSONObject
//首先先把外層的info解析出來再解析內層的”love”、”color”、”say”欄位
String LOVE = new JSONObject(new JSONObject(mJSONText).getString(“info”)).getString(“love”);
String COLOR = new JSONObject(new JSONObject(mJSONText).getString(“info”)).getString(“color”);
String SAY = new JSONObject(new JSONObject(mJSONText).getString(“info”)).getString(“say”);
========
2.第二種類型為JSONObject內包覆一個JSONArray。
//例如Server API回傳的mJSONText文字為下列
{“id”:”2″,”name”:”小黑人”,”title”:”解析JSON格式文字 by 小黑人的Android教室” ,”info”:{{“lesson”:”第一篇”,”data”:”ImageView運用篇”},{“lesson”:”第二篇”,”data”:”TextView運用篇”},{“lesson”:”第三篇”,”data”:”Gallery運用篇”}}}
{
“id”: “2”,
“name”: “小黑人”,
“title”: “解析JSON格式文字 by 小黑人的Android教室”,
“info”: {
{
“lesson”: “第一篇”,
“data”: “ImageView運用篇”
},
{
“lesson”: “第二篇”,
“data”: “TextView運用篇”
},
{
“lesson”: “第三篇”,
“data”: “Gallery運用篇”
}
}
}
//建立一個JSONObject並帶入JSON格式文字,getInt取出”id”欄位的數值
int ID = new JSONObject(mJSONText).getInt(“id”);
//建立一個JSONObject並帶入JSON格式文字,getString取出”name”與”title”欄位的數值
String NAME = new JSONObject(mJSONText).getString(“name”);
String TITLE = new JSONObject(mJSONText).getString(“title”);
//相同的方法在info這裡讀取出的是一串JSON格式文字的JSONArray
String INFO = new JSONObject(mJSONText).getString(“info”);
//要取出info裡的JSONArray欄位值必須先getJSONObject,依照JSONArray的size並帶入所想要取出資訊的JSONObject位置,且依序取出來後再進行讀取內部欄位資訊(“lesson”與”data”)
String LESSON1 = new JSONArray(new JSONObject(mJSONText).getString(“info”)).getJSONObject(0).getString(“lesson”);
String DATA1 = new JSONArray(new JSONObject(mJSONText).getString(“info”)).getJSONObject(0).getString(“data”);
String LESSON2 = new JSONArray(new JSONObject(mJSONText).getString(“info”)).getJSONObject(1).getString(“lesson”);
String DATA2 = new JSONArray(new JSONObject(mJSONText).getString(“info”)).getJSONObject(1).getString(“data”);
String LESSON3 = new JSONArray(new JSONObject(mJSONText).getString(“info”)).getJSONObject(2).getString(“lesson”);
String DATA3 = new JSONArray(new JSONObject(mJSONText).getString(“info”)).getJSONObject(2).getString(“data”);
========
3.第三種類型為JSONArray內包覆一個JSONObject。
//例如Server API回傳的mJSONText文字為下列
{{“id”:”1″,”lesson”:”第一篇”,”data”:”歡迎來到小黑人的Android教室-現在要上第一節課”},
{“id”:”2″,”lesson”:”第二篇”,”data”:”歡迎來到小黑人的Android教室-現在要上第二節課”},
{“id”:”3″,”lesson”:”第三篇”,”data”:”歡迎來到小黑人的Android教室-現在要上第三節課”}}
{
{
“id”: “1”,
“lesson”: “第一篇”,
“data”: “歡迎來到小黑人的Android教室-現在要上第一節課”
},
{
“id”: “2”,
“lesson”: “第二篇”,
“data”: “歡迎來到小黑人的Android教室-現在要上第二節課”
},
{
“id”: “3”,
“lesson”: “第三篇”,
“data”: “歡迎來到小黑人的Android教室-現在要上第三節課”
}
}
//先取出JSONArray中的第幾個JSONObject,由getJSONObject帶入進行取出,再get欄位資訊取得資料
int ID1 = new JSONArray(mJSONText).getJSONObject(0).getInt(“id”);
String LESSON1 = new JSONArray(mJSONText).getJSONObject(0).getString(“lesson”);
String DATA1 = new JSONArray(mJSONText).getJSONObject(0).getString(“data”);
int ID2 = new JSONArray(mJSONText).getJSONObject(1).getInt(“id”);
String LESSON2 = new JSONArray(mJSONText).getJSONObject(1).getString(“lesson”);
String DATA2 = new JSONArray(mJSONText).getJSONObject(1).getString(“data”);
int ID3 = new JSONArray(mJSONText).getJSONObject(2).getInt(“id”);
String LESSON3 = new JSONArray(mJSONText).getJSONObject(2).getString(“lesson”);
String DATA3 = new JSONArray(mJSONText).getJSONObject(2).getString(“data”);
========
OTT json
{“data”:[{“class_id”:”1″,”class_name”:”\u76f4\u64ad”,”app_id”:”1″,”title”:”\u76f4\u64ad”,”file”:”http:\/\/apk.jashliao.pixnet.net\/6e833e14a9ce1ca94f1cb565f116f499.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/6e833e14a9ce1ca94f1cb565f116f499.png”,”apkname”:”com.donaldcmlin.cat.live”,”viewable”:”all”,”description”:null},{“class_id”:”2″,”class_name”:”\u9ede\u64ad”,”app_id”:”6″,”title”:”\u96fb\u5f71″,”file”:”http:\/\/apk.jashliao.pixnet.net\/abc7dd0c1ffbf1aba4cf9543095093f7.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/abc7dd0c1ffbf1aba4cf9543095093f7.png”,”apkname”:”com.donaldcmlin.cat.movie”,”viewable”:”all”,”description”:null},{“class_id”:”2″,”class_name”:”\u9ede\u64ad”,”app_id”:”7″,”title”:”\u96fb\u8996\u5287″,”file”:”http:\/\/apk.jashliao.pixnet.net\/b387da491b326bdff9a9a902ab5cbe97.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/b387da491b326bdff9a9a902ab5cbe97.png”,”apkname”:”com.donaldcmlin.cat.tv”,”viewable”:”all”,”description”:null},{“class_id”:”2″,”class_name”:”\u9ede\u64ad”,”app_id”:”8″,”title”:”\u7d00\u5be6″,”file”:”http:\/\/apk.jashliao.pixnet.net\/987ccb8060c852198185b3165aadec48.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/987ccb8060c852198185b3165aadec48.png”,”apkname”:”com.donaldcmlin.cat.jilu”,”viewable”:”all”,”description”:null},{“class_id”:”2″,”class_name”:”\u9ede\u64ad”,”app_id”:”9″,”title”:”\u52d5\u6f2b”,”file”:”http:\/\/apk.jashliao.pixnet.net\/b3fe4b6ff4cc7287ff653b28368b8dff.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/b3fe4b6ff4cc7287ff653b28368b8dff.png”,”apkname”:”com.donaldcmlin.cat.comic”,”viewable”:”all”,”description”:null},{“class_id”:”4″,”class_name”:”\u7d9c\u5408″,”app_id”:”17″,”title”:”\u5c11\u5152″,”file”:”http:\/\/apk.jashliao.pixnet.net\/45836c6440def2ea18feddad3748f9cc.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/45836c6440def2ea18feddad3748f9cc.png”,”apkname”:”com.donaldcmlin.cat.kids”,”viewable”:”all”,”description”:null},{“class_id”:”4″,”class_name”:”\u7d9c\u5408″,”app_id”:”18″,”title”:”\u7d9c\u85dd”,”file”:”http:\/\/apk.jashliao.pixnet.net\/3812553b9f80d7ed5852fc6c39e9ad47.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/3812553b9f80d7ed5852fc6c39e9ad47.png”,”apkname”:”com.donaldcmlin.cat.zongyi”,”viewable”:”all”,”description”:null},{“class_id”:”4″,”class_name”:”\u7d9c\u5408″,”app_id”:”19″,”title”:”\u6232\u66f2″,”file”:”http:\/\/apk.jashliao.pixnet.net\/0cb76bb3ac0582960d70188a4c6494e7.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/0cb76bb3ac0582960d70188a4c6494e7.png”,”apkname”:”com.donaldcmlin.cat.xiqu”,”viewable”:”all”,”description”:null},{“class_id”:”4″,”class_name”:”\u7d9c\u5408″,”app_id”:”20″,”title”:”\u97f3\u6a02″,”file”:”http:\/\/apk.jashliao.pixnet.net\/3b5f32a92dd7964e27b1b8aff5d5ad97.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/3b5f32a92dd7964e27b1b8aff5d5ad97.png”,”apkname”:”com.donaldcmlin.cat.mv”,”viewable”:”all”,”description”:null},{“class_id”:”4″,”class_name”:”\u7d9c\u5408″,”app_id”:”21″,”title”:”\u6b77\u53f2\u6536\u85cf”,”file”:”http:\/\/apk.jashliao.pixnet.net\/b5f0ee1de802f7c7e1c24a1244d60ce5.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/b5f0ee1de802f7c7e1c24a1244d60ce5.png”,”apkname”:”com.donaldcmlin.cat.history”,”viewable”:”all”,”description”:null},{“class_id”:”1″,”class_name”:”\u76f4\u64ad”,”app_id”:”2″,”title”:”\u7db2\u8def\u96fb\u8996″,”file”:”http:\/\/apk.jashliao.pixnet.net\/38311e74a1beeb8c7550022723a4eff0.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/38311e74a1beeb8c7550022723a4eff0.png”,”apkname”:”com.live”,”viewable”:”all”,”description”:null},{“class_id”:”1″,”class_name”:”\u76f4\u64ad”,”app_id”:”4″,”title”:”\u96fb\u8996\u56de\u770b”,”file”:”http:\/\/apk.jashliao.pixnet.net\/1031482e02c63987b195840bdf34ec6b.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/1031482e02c63987b195840bdf34ec6b.png”,”apkname”:”com.tvreplay”,”viewable”:”all”,”description”:null},{“class_id”:”2″,”class_name”:”\u9ede\u64ad”,”app_id”:”10″,”title”:”\u5f71\u8996\u9ede\u64ad”,”file”:”http:\/\/apk.jashliao.pixnet.net\/c53c2b9c778b83d54638cf3e9ceef21b.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/c53c2b9c778b83d54638cf3e9ceef21b.png”,”apkname”:”com.vod”,”viewable”:”all”,”description”:null},{“class_id”:”2″,”class_name”:”\u9ede\u64ad”,”app_id”:”11″,”title”:”\u98a8\u884c\u7db2(\u96fb\u8996\u7248)”,”file”:”http:\/\/apk.jashliao.pixnet.net\/ce821cbf12d0dee9a136e5da0932b5f0.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/ce821cbf12d0dee9a136e5da0932b5f0.png”,”apkname”:”com.funshion.video”,”viewable”:”all”,”description”:null},{“class_id”:”2″,”class_name”:”\u9ede\u64ad”,”app_id”:”13″,”title”:”\u5929\u5929\u770b\u9023\u7e8c\u5287″,”file”:”http:\/\/apk.jashliao.pixnet.net\/384fc5b5499f1a0b2e2e79922c7dcf28.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/384fc5b5499f1a0b2e2e79922c7dcf28.png”,”apkname”:”com.aastudio.newtvdrama”,”viewable”:”all”,”description”:null},{“class_id”:”2″,”class_name”:”\u9ede\u64ad”,”app_id”:”101″,”title”:”PTV”,”file”:”http:\/\/apk.jashliao.pixnet.net\/0b53e1fff5573e649041d553879adcf7.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/0b53e1fff5573e649041d553879adcf7.png”,”apkname”:”info.ottclub.ptv”,”viewable”:”all”,”description”:null},{“class_id”:”2″,”class_name”:”\u9ede\u64ad”,”app_id”:”102″,”title”:”ATV”,”file”:”http:\/\/apk.jashliao.pixnet.net\/2970dd0a91d1d17491ac8c4f6f240826.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/2970dd0a91d1d17491ac8c4f6f240826.png”,”apkname”:”info.ottclub.atv”,”viewable”:”all”,”description”:null},{“class_id”:”3″,”class_name”:”\u6b61\u5531K\u6b4c”,”app_id”:”36″,”title”:”\u6b4c\u5427″,”file”:”http:\/\/apk.jashliao.pixnet.net\/2fff226b6f03711624c8ee4f63648511.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/2fff226b6f03711624c8ee4f63648511.png”,”apkname”:”com.uniview.geba.box”,”viewable”:”all”,”description”:null},{“class_id”:”4″,”class_name”:”\u7d9c\u5408″,”app_id”:”22″,”title”:”PPTV\u805a\u529bHD”,”file”:”http:\/\/apk.jashliao.pixnet.net\/f706bbd2b4e885dd44bdd898c3a53896.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/f706bbd2b4e885dd44bdd898c3a53896.png”,”apkname”:”com.pplive.androidpad”,”viewable”:”all”,”description”:null},{“class_id”:”5″,”class_name”:”\u6559\u80b2″,”app_id”:”24″,”title”:”\u7db2\u6613\u516c\u958b\u8ab2″,”file”:”http:\/\/apk.jashliao.pixnet.net\/abc9b656249b5e27d182da187bd0c485.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/abc9b656249b5e27d182da187bd0c485.png”,”apkname”:”com.netease.vopen.tablet”,”viewable”:”all”,”description”:null},{“class_id”:”5″,”class_name”:”\u6559\u80b2″,”app_id”:”25″,”title”:”TED”,”file”:”http:\/\/apk.jashliao.pixnet.net\/20eb313e60eef455b94c3f9a91cfdf93.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/20eb313e60eef455b94c3f9a91cfdf93.png”,”apkname”:”com.ted.android”,”viewable”:”all”,”description”:null},{“class_id”:”5″,”class_name”:”\u6559\u80b2″,”app_id”:”26″,”title”:”\u5065\u5eb7\u6709\u5bb6″,”file”:”http:\/\/apk.jashliao.pixnet.net\/937f4b9cc66f67e8ed796cf3b8d95976.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/937f4b9cc66f67e8ed796cf3b8d95976.png”,”apkname”:”com.broadin.beitai”,”viewable”:”all”,”description”:null},{“class_id”:”6″,”class_name”:”\u904a\u6232\u52d5\u6f2b”,”app_id”:”29″,”title”:”\u68cb\u985e\u5927\u5e2b”,”file”:”http:\/\/apk.jashliao.pixnet.net\/659de41c25f5223f25e07d7e9c0d31ea.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/659de41c25f5223f25e07d7e9c0d31ea.png”,”apkname”:”com.rainbow.Master”,”viewable”:”all”,”description”:null},{“class_id”:”6″,”class_name”:”\u904a\u6232\u52d5\u6f2b”,”app_id”:”30″,”title”:”\u6383\u96f7″,”file”:”http:\/\/apk.jashliao.pixnet.net\/e89e394000831ad3de1ed2211b148018.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/e89e394000831ad3de1ed2211b148018.png”,”apkname”:”Com.Coocaa.AhZk.Sl”,”viewable”:”all”,”description”:null},{“class_id”:”6″,”class_name”:”\u904a\u6232\u52d5\u6f2b”,”app_id”:”31″,”title”:”\u7f8e\u5c11\u5973\u9ebb\u5c07\u9928″,”file”:”http:\/\/apk.jashliao.pixnet.net\/59371afb324729ff05cff468dca4bc56.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/59371afb324729f
f05cff468dca4bc56.png”,”apkname”:”com.rainbow.FMaj”,”viewable”:”all”,”description”:null},{“class_id”:”6″,”class_name”:”\u904a\u6232\u52d5\u6f2b”,”app_id”:”32″,”title”:”\u6253\u5730\u9f20TV\u7248″,”file”:”http:\/\/apk.jashliao.pixnet.net\/456ab9ff4fd63adb5413d0c2870d2613.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/456ab9ff4fd63adb5413d0c2870d2613.png”,”apkname”:”com.Coocaa.BjLbs.mole”,”viewable”:”all”,”description”:null},{“class_id”:”6″,”class_name”:”\u904a\u6232\u52d5\u6f2b”,”app_id”:”33″,”title”:”X\u8a08\u5283″,”file”:”http:\/\/apk.jashliao.pixnet.net\/0b1315d3da82f18857a87e1975a32b75.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/0b1315d3da82f18857a87e1975a32b75.png”,”apkname”:”com.xplane”,”viewable”:”all”,”description”:null},{“class_id”:”6″,”class_name”:”\u904a\u6232\u52d5\u6f2b”,”app_id”:”35″,”title”:”\u55f6\u54e9\u55f6\u54e9\u52d5\u756b”,”file”:”http:\/\/apk.jashliao.pixnet.net\/adce31c2c3e33dc501b84a0788356159.apk”,”appicon”:”http:\/\/apk.jashliao.pixnet.net\/icons\/adce31c2c3e33dc501b84a0788356159.png”,”apkname”:”tv.danmaku.bili”,”viewable”:”all”,”description”:null}]}
{
“data”: [{
“class_id”: “1”,
“class_name”: “\u76f4\u64ad”,
“app_id”: “1”,
“title”: “\u76f4\u64ad”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/6e833e14a9ce1ca94f1cb565f116f499.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/6e833e14a9ce1ca94f1cb565f116f499.png”,
“apkname”: “com.donaldcmlin.cat.live”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “2”,
“class_name”: “\u9ede\u64ad”,
“app_id”: “6”,
“title”: “\u96fb\u5f71”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/abc7dd0c1ffbf1aba4cf9543095093f7.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/abc7dd0c1ffbf1aba4cf9543095093f7.png”,
“apkname”: “com.donaldcmlin.cat.movie”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “2”,
“class_name”: “\u9ede\u64ad”,
“app_id”: “7”,
“title”: “\u96fb\u8996\u5287”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/b387da491b326bdff9a9a902ab5cbe97.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/b387da491b326bdff9a9a902ab5cbe97.png”,
“apkname”: “com.donaldcmlin.cat.tv”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “2”,
“class_name”: “\u9ede\u64ad”,
“app_id”: “8”,
“title”: “\u7d00\u5be6”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/987ccb8060c852198185b3165aadec48.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/987ccb8060c852198185b3165aadec48.png”,
“apkname”: “com.donaldcmlin.cat.jilu”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “2”,
“class_name”: “\u9ede\u64ad”,
“app_id”: “9”,
“title”: “\u52d5\u6f2b”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/b3fe4b6ff4cc7287ff653b28368b8dff.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/b3fe4b6ff4cc7287ff653b28368b8dff.png”,
“apkname”: “com.donaldcmlin.cat.comic”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “4”,
“class_name”: “\u7d9c\u5408”,
“app_id”: “17”,
“title”: “\u5c11\u5152”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/45836c6440def2ea18feddad3748f9cc.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/45836c6440def2ea18feddad3748f9cc.png”,
“apkname”: “com.donaldcmlin.cat.kids”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “4”,
“class_name”: “\u7d9c\u5408”,
“app_id”: “18”,
“title”: “\u7d9c\u85dd”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/3812553b9f80d7ed5852fc6c39e9ad47.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/3812553b9f80d7ed5852fc6c39e9ad47.png”,
“apkname”: “com.donaldcmlin.cat.zongyi”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “4”,
“class_name”: “\u7d9c\u5408”,
“app_id”: “19”,
“title”: “\u6232\u66f2”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/0cb76bb3ac0582960d70188a4c6494e7.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/0cb76bb3ac0582960d70188a4c6494e7.png”,
“apkname”: “com.donaldcmlin.cat.xiqu”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “4”,
“class_name”: “\u7d9c\u5408”,
“app_id”: “20”,
“title”: “\u97f3\u6a02”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/3b5f32a92dd7964e27b1b8aff5d5ad97.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/3b5f32a92dd7964e27b1b8aff5d5ad97.png”,
“apkname”: “com.donaldcmlin.cat.mv”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “4”,
“class_name”: “\u7d9c\u5408”,
“app_id”: “21”,
“title”: “\u6b77\u53f2\u6536\u85cf”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/b5f0ee1de802f7c7e1c24a1244d60ce5.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/b5f0ee1de802f7c7e1c24a1244d60ce5.png”,
“apkname”: “com.donaldcmlin.cat.history”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “1”,
“class_name”: “\u76f4\u64ad”,
“app_id”: “2”,
“title”: “\u7db2\u8def\u96fb\u8996”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/38311e74a1beeb8c7550022723a4eff0.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/38311e74a1beeb8c7550022723a4eff0.png”,
“apkname”: “com.live”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “1”,
“class_name”: “\u76f4\u64ad”,
“app_id”: “4”,
“title”: “\u96fb\u8996\u56de\u770b”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/1031482e02c63987b195840bdf34ec6b.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/1031482e02c63987b195840bdf34ec6b.png”,
“apkname”: “com.tvreplay”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “2”,
“class_name”: “\u9ede\u64ad”,
“app_id”: “10”,
“title”: “\u5f71\u8996\u9ede\u64ad”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/c53c2b9c778b83d54638cf3e9ceef21b.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/c53c2b9c778b83d54638cf3e9ceef21b.png”,
“apkname”: “com.vod”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “2”,
“class_name”: “\u9ede\u64ad”,
“app_id”: “11”,
“title”: “\u98a8\u884c\u7db2(\u96fb\u8996\u7248)”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/ce821cbf12d0dee9a136e5da0932b5f0.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/ce821cbf12d0dee9a136e5da0932b5f0.png”,
“apkname”: “com.funshion.video”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “2”,
“class_name”: “\u9ede\u64ad”,
“app_id”: “13”,
“title”: “\u5929\u5929\u770b\u9023\u7e8c\u5287”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/384fc5b5499f1a0b2e2e79922c7dcf28.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/384fc5b5499f1a0b2e2e79922c7dcf28.png”,
“apkname”: “com.aastudio.newtvdrama”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “2”,
“class_name”: “\u9ede\u64ad”,
“app_id”: “101”,
“title”: “PTV”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/0b53e1fff5573e649041d553879adcf7.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/0b53e1fff5573e649041d553879adcf7.png”,
“apkname”: “info.ottclub.ptv”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “2”,
“class_name”: “\u9ede\u64ad”,
“app_id”: “102”,
“title”: “ATV”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/2970dd0a91d1d17491ac8c4f6f240826.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/2970dd0a91d1d17491ac8c4f6f240826.png”,
“apkname”: “info.ottclub.atv”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “3”,
“class_name”: “\u6b61\u5531K\u6b4c”,
“app_id”: “36”,
“title”: “\u6b4c\u5427”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/2fff226b6f03711624c8ee4f63648511.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/2fff226b6f03711624c8ee4f63648511.png”,
“apkname”: “com.uniview.geba.box”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “4”,
“class_name”: “\u7d9c\u5408”,
“app_id”: “22”,
“title”: “PPTV\u805a\u529bHD”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/f706bbd2b4e885dd44bdd898c3a53896.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/f706bbd2b4e885dd44bdd898c3a53896.png”,
“apkname”: “com.pplive.androidpad”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “5”,
“class_name”: “\u6559\u80b2”,
“app_id”: “24”,
“title”: “\u7db2\u6613\u516c\u958b\u8ab2”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/abc9b656249b5e27d182da187bd0c485.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/abc9b656249b5e27d182da187bd0c485.png”,
“apkname”: “com.netease.vopen.tablet”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “5”,
“class_name”: “\u6559\u80b2”,
“app_id”: “25”,
“title”: “TED”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/20eb313e60eef455b94c3f9a91cfdf93.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/20eb313e60eef455b94c3f9a91cfdf93.png”,
“apkname”: “com.ted.android”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “5”,
“class_name”: “\u6559\u80b2”,
“app_id”: “26”,
“title”: “\u5065\u5eb7\u6709\u5bb6”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/937f4b9cc66f67e8ed796cf3b8d95976.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/937f4b9cc66f67e8ed796cf3b8d95976.png”,
“apkname”: “com.broadin.beitai”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “6”,
“class_name”: “\u904a\u6232\u52d5\u6f2b”,
“app_id”: “29”,
“title”: “\u68cb\u985e\u5927\u5e2b”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/659de41c25f5223f25e07d7e9c0d31ea.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/659de41c25f5223f25e07d7e9c0d31ea.png”,
“apkname”: “com.rainbow.Master”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “6”,
“class_name”: “\u904a\u6232\u52d5\u6f2b”,
“app_id”: “30”,
“title”: “\u6383\u96f7”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/e89e394000831ad3de1ed2211b148018.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/e89e394000831ad3de1ed2211b148018.png”,
“apkname”: “Com.Coocaa.AhZk.Sl”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “6”,
“class_name”: “\u904a\u6232\u52d5\u6f2b”,
“app_id”: “31”,
“title”: “\u7f8e\u5c11\u5973\u9ebb\u5c07\u9928”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/59371afb324729ff05cff468dca4bc56.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/59371afb324729ff05cff468dca4bc56.png”,
“apkname”: “com.rainbow.FMaj”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “6”,
“class_name”: “\u904a\u6232\u52d5\u6f2b”,
“app_id”: “32”,
“title”: “\u6253\u5730\u9f20TV\u7248”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/456ab9ff4fd63adb5413d0c2870d2613.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/456ab9ff4fd63adb5413d0c2870d2613.png”,
“apkname”: “com.Coocaa.BjLbs.mole”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “6”,
“class_name”: “\u904a\u6232\u52d5\u6f2b”,
“app_id”: “33”,
“title”: “X\u8a08\u5283”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/0b1315d3da82f18857a87e1975a32b75.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/0b1315d3da82f18857a87e1975a32b75.png”,
“apkname”: “com.xplane”,
“viewable”: “all”,
“description”: null
},
{
“class_id”: “6”,
“class_name”: “\u904a\u6232\u52d5\u6f2b”,
“app_id”: “35”,
“title”: “\u55f6\u54e9\u55f6\u54e9\u52d5\u756b”,
“file”: “http:\/\/apk.jashliao.pixnet.net\/adce31c2c3e33dc501b84a0788356159.apk”,
“appicon”: “http:\/\/apk.jashliao.pixnet.net\/icons\/adce31c2c3e33dc501b84a0788356159.png”,
“apkname”: “tv.danmaku.bili”,
“viewable”: “all”,
“description”: null
}]
}
JSONArray jsonArray = new JSONArray(m_StrJSONData);
intJsonAmount=jsonArray.length();
StrUrlArray=new String[intJsonAmount];
StrPackageNameArray=new String[intJsonAmount];
for(int i=0;i<intJsonAmount;i++)
{
JSONObject jsonObject = jsonArray.getJSONObject(i);
StrUrlArray[i]=new String();
StrPackageNameArray[i]=new String();
StrUrlArray[i] = jsonObject.getString(“appicon”);
StrPackageNameArray[i] = jsonObject.getString(“apkname”)+”.png”;
}