根据Dochttp://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGET.html,S3服务似乎以XML响应.
Is there a way to get it in JSON format instead?
根据Dochttp://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGET.html,S3服务似乎以XML响应.
Is there a way to get it in JSON format instead?
不
Also the response is not always valid XML! This is a known bug in S3. In S3 you can use any UTF-8 string as a key for an object, including ones with XML invalid characters (<, > etc are fine) but some weird control characters are NOT.
因此,如果您以某种方式在S3上获得了一个文件,其中包含一个足够奇怪的字符串作为键,那么请求该文件的列表将返回无效的XML!
因此,也许他们可以通过将某种JSON返回作为选项来修复这个错误,但不要马上寻找它.XML漏洞已经被发现很多年了.https://forums.aws.amazon.com/thread.jspa?threadID=10869
另一个痛点是(至少一年前我try )不可能将XML响应压缩为gzip.因此,您在传输非常松散的XML时浪费了大量带宽.
是时候让S3支持一种新的、可压缩且健壮的返回数据格式了.