У меня есть список Object.that list Я перехожу к Gson.Не удалось получить значения с помощью Gson
Gson gson = new Gson();
String toJson = gson.toJson(userDetailFeedNotifierVoList);
System.out.println("Gson Object : " + toJson);
Здесь я получаю в консоли:
[
{
"title": "Suman Mudiraj assigned you a to-do item named test todo in the Launch GALAXY activity.",
"time": "2014-10-08T10:51:07.095Z",
"url": "https://greenhouse.lotus.com/activities/service/html/mainpage#activitypage,0c7b1fb5-a87f-4112-9b7f-67ed6bd0233f,entry=634e9535-ba17-40da-a242-bd9caff6f17d",
"schedullarTime": 0
},
{
"title": "Suman Mudiraj assigned you a to-do item named test todo in the Launch GALAXY activity.",
"time": "2014-10-08T10:51:07.095Z",
"url": "https://greenhouse.lotus.com/activities/service/html/mainpage#activitypage,0c7b1fb5-a87f-4112-9b7f-67ed6bd0233f,entry=634e9535-ba17-40da-a242-bd9caff6f17d",
"schedullarTime": 0
}
]
Здесь я хочу, чтобы получить титул и url.Can вы предложить мне?
Вы можете либо пометить поле как переходное, либо использовать аннотацию @Expose, если хотите исключить их из процесса сериализации. –