python convert JSON object contet type
I'm working on reading data stored in text and csv files using python and process them to create a new JSON document and all works fine except for the content type is application/octet-stream
but when I create the JSON document I want this file content type to be application/json
.
Data in json_document
variable
[
{
"URL":"http://myexample.net",
"domain":"abc",
"domainSerialId":"skdksj12391ncjsacn",
"proxy":"myexample.net"
},
{
"URL":"http://myexample.org",
"domain":"def",
"domainSerialId":"sakdjsaye132978ejwdnwd",
"proxy":"myexample.org"
}
]
json.dumps(json_document)
This is the new consolidated JSON document that gets created. Having issue trying t开发者_如何学Pythono convert the content type using json.dumps
. I upload these documents to Azure blob storage and see the file Content Type
to be different.
Assuming you are using the Blob Service API, you need to specify the content-type in your request, otherwise the default is application/octet-stream.
https://learn.microsoft.com/en-us/rest/api/storageservices/put-blob
精彩评论