我正在开发一个应用程序客户端来与 Open Library API ( https://openlibrary.org/developers/api ) 连接,以通过 Gson 从 google 获取 Json 返回读取的一些信息,但我有一个参数/的问题更改名称的属性。我发送了此请求https://openlibrary.org/api/books?bibkeys=ISBN:9788580415544&jscmd=details&format=json 按 ISBN (9788580415544) 搜索,并且 json 返回具有包含此编号的属性 (ISBN:9788580415544),我可以'不要把信息带进去。如果我使用另一个 ISBN 更改请求,我将得到一个带有另一个参数/属性名称的 json
请问我该怎么办?
返回文件的一部分
{
"ISBN:9788580415544": {
"info_url": "https://openlibrary.org/books/OL26851485M/O_Guia_Definitivo_do_Mochileiro_das_Galáxias_(Em_Portuguese_do_Brasil)",
"bib_key": "ISBN:9788580415544",
"preview_url": "https://openlibrary.org/books/OL26851485M/O_Guia_Definitivo_do_Mochileiro_das_Galáxias_(Em_Portuguese_do_Brasil)",
"thumbnail_url": "https://covers.openlibrary.org/b/id/8540059-S.jpg",
"details": {
"publishers": [
"Arqueiro"
],
"classifications": {},
"key": "/books/OL26851485M",
"source_records": [
"amazon:8580415543"
],
"title": "O Guia Definitivo do Mochileiro das Galáxias (Em Portuguese do Brasil)",
"identifiers": {},
"covers": [
8540059
]
}
}
}
模型类
public class Objeto {
private ObjetoDetalhe obejtodetalhe;
public ObjetoDetalhe getObejtodetalhe() {
return obejtodetalhe;
}
public void setObejtodetalhe(ObjetoDetalhe obejtodetalhe) {
this.obejtodetalhe = obejtodetalhe;
}
public class ObjetoDetalhe {
private String info_url;
private String bib_key;
private String preview_url;
private String thumbnail_url;
public String getInfo_url() {
return info_url;
}
public void setInfo_url(String info_url) {
this.info_url = info_url;
}
public String getBib_key() {
return bib_key;
}
public void setBib_key(String bib_key) {
this.bib_key = bib_key;
}
拉丁的传说
白猪掌柜的
相关分类