我在这里阅读JOSS。我从https://github.com/javaswift/joss/blob/master/src/main/java/org/javaswift/joss/command/shared/container/StoredObjectListElement.java获得了以下类定义。
public class StoredObjectListElement {
public String subdir;
public String name;
public String hash;
public long bytes;
@JsonProperty(value="content_type")
public String contentType;
@JsonProperty(value="last_modified")
public String lastModified;
}
但是API列表对象的响应看起来像(在此处https://developer.openstack.org/api-ref/object-store/index.html#containers获取API):
[
{
"hash": "451e372e48e0f6b1114fa0724aa79fa1",
"last_modified": "2014-01-15T16:41:49.390270",
"bytes": 14,
"name": "goodbye",
"content_type": "application/octet-stream"
},
{
"hash": "ed076287532e86365e841e92bfc50d8c",
"last_modified": "2014-01-15T16:37:43.427570",
"bytes": 12,
"name": "helloworld",
"content_type": "application/octet-stream"
}
]
字段(subdir
和hash
)似乎不匹配。为什么?我可能会误解API和类。
欢迎任何提示。谢谢。