2017-02-22 73 views
0

我正在製作和Android應用程序中,我從API獲取JSON數據,但我不知道如何獲取JSON數據,我們傳遞序列化的getter和setter類。 這裏是我的JSON數據{"status":true,"message":"Notifications fetched.","data":[{"id":"69","type":"liked","text":"Sandip Ghosh liked your photo.","for_userid":"56","from_userid":"55","for_image":"54","seen":"0","username":"sandip","firstname":"Sandip","lastname":"Ghosh","imgname":""},{"id":"64","type":"liked","text":"Sandip Ghosh liked your photo.","for_userid":"56","from_userid":"55","for_image":"54","seen":"0","username":"sandip","firstname":"Sandip","lastname":"Ghosh","imgname":""},{"id":"63","type":"liked","text":"Sandip Ghosh liked your photo.","for_userid":"56","from_userid":"55","for_image":"54","seen":"0","username":"sandip","firstname":"Sandip","lastname":"Ghosh","imgname":""},{"id":"62","type":"commented","text":"Sandip Ghosh commented onyour photo.","for_userid":"56","from_userid":"55","for_image":"54","seen":"0","username":"sandip","firstname":"Sandip","lastname":"Ghosh","imgname":""},{"id":"61","type":"liked","text":"Sandip Ghosh liked your photo.","for_userid":"56","from_userid":"55","for_image":"53","seen":"0","username":"sandip","firstname":"Sandip","lastname":"Ghosh","imgname":""},{"id":"27","type":"Follow","text":"Sandip Ghosh started following you","for_userid":"56","from_userid":"55","for_image":"0","seen":"1","username":"sandip","firstname":"Sandip","lastname":"Ghosh","imgname":""}]}如何獲取json in retrofit2

+0

小心發佈您的代碼? – Coder

回答