2017-02-22 64 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

回答