如何在 Android 中使用 GSON 反序列化来自服务器的以下响应?我想反序列化以下代码并将数据存储在使用 JsonReader 的 java 类实例中。
{
"createTimestamp": "2013-05-23 09:39:41",
"firstName": "ABCD",
"lastName": "EFGH",
"mediaListResponse":
[
{
"mediaTitle": "Media Title",
"createTimestamp": null,
"mediaId": 120,
"mediaUrl": "/img/mediadata/46/420/1/230.jpg",
"authenticationKey": null,
"responseCode": null,
"responseMessage": null
},
{
"mediaTitle": "Media Title",
"createTimestamp": null,
"mediaId": 120,
"mediaUrl": "/img/mediadata/46/420/1/230.jpg",
"authenticationKey": null,
"responseCode": null,
"responseMessage": null
}
],
"authenticationKey": null,
"responseCode": "200",
"responseMessage": "OK"
}