0
我想從這個json數據中提取id值。我嘗試過很多方法,但我不知道是什麼地方出了問題我的代碼還我Wnt信號到ID存儲到一個數組從json中提取名稱和ID
JSONObject json = readurl("https://graph.facebook.com/"+s);
System.out.println(json);
String json2=json.getString("likes");
{"data":[
{
"id":"**********",
"name":"skkjghkjhkj"
},
{
"id":"********",
"name":"khkfjhkjf"
}
]
哪個庫您使用? – Jhanvi
我使用facebook4j – lulu
@Jhanvi同樣的問題,我張貼在here ..但沒有答案爲我工作http://stackoverflow.com/questions/22074192/extracting-json-fields-using-java/22074360?noredirect= 1#comment33477332_22074360 – lulu