我能够使用 Google Gson 将简单的 Json 转换为 java 对象。问题是我无法将这种特定类型的响应转换为 java 对象。我认为这是因为我不确定如何为它实际建模 java 类。以下是Json:
{
"List": {
"Items": [
{
"comment": "comment",
"create": "random",
"ID": 21341234,
"URL": "www.asdf.com"
},
{
"comment": "casdf2",
"create": "rafsdfom2",
"ID": 1234,
"Url": "www.asdfd.com"
}
]
},
"related": {
"Book": "ISBN",
"ID": "id"
}}