According to the doc http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGET.html the S3 service seems to respond in XML.
Is there a way to get it in JSON format instead?
Amazon S3 Select works on objects stored in CSV, JSON, or Apache Parquet format. It also works with objects that are compressed with GZIP or BZIP2 (for CSV and JSON objects only), and server-side encrypted objects.
PDF. Retrieves objects from Amazon S3. To use GET , you must have READ access to the object. If you grant READ access to the anonymous user, you can return the object without using an authorization header.
You are working with the S3 API and receive an error: 409 Conflict. What is a possible cause of this error? You're attempting to delete a bucket without first removing the contents in the bucket. Explanation: A 409 HTTP Status Code can indicate a BucketNotEmpty error code.
No.
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.
So if somehow you get a file up on S3 with a weird enough string as a key, asking for a listing of that will return invalid XML!
So perhaps they could fix this bug by making some sort of JSON return as an option, but don't look for it soon. The XML bug has been known for years. https://forums.aws.amazon.com/thread.jspa?threadID=10869 https://forums.aws.amazon.com/thread.jspa?threadID=82485
Another sore point is that its impossible (at least when I tried a year ago) to get the XML response gzipped. So you waste lots of bandwidth transmitting very fluffy XML.
It's time for S3 to support a new returned data format that is compressed and robust.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With