获取统一组图像时批量 JSON 格式错误 [英] Malformed JSON in Batch when getting Unified Group images
问题描述
我正在使用请求 https://graph.microsoft.com/v1.0/$batch API 用于获取组图像,并且在批处理中,单个图像响应包含 "Content-Type":"image/pjpeg" 并且会破坏响应的 json 解析(在JSON...).
I'm using request https://graph.microsoft.com/v1.0/$batch API to fetch group images and within batch, single image response contains "Content-Type":"image/pjpeg" and that breaks json parsing of the response (unexpected token X in the JSON...).
请求:
{
"requests": [
{
"id":"88aec8df-ea5e-4ad6-8534-3b1ac70693e2",
"method":"GET",
"url":"/groups/88aec8df-ea5e-4ad6-8534-3b1ac70693e2/photo/$value"
},
{
"id":"beeadb9d-02cf-4437-ab7d-7762a58e70a6",
"method":"GET",
"url":"/groups/beeadb9d-02cf-4437-ab7d-7762a58e70a6/photo/$value"
}
]
}
似乎 Graph 批处理不能正确地将 pjpeg 图像进行 Base64 编码以响应 json.普通 "Content-Type":"image/jpeg" 批量图片效果很好.
Seems that Graph batch does not Base64 encode pjpeg images correctly to response json. Normal "Content-Type":"image/jpeg" images in batch works fine.
没有从已知问题中找到任何与此相关的内容.
Did not find anything related to this from known issues.
推荐答案
出于理智目的:这是批处理中的一个错误,此后已得到解决.
For sanity purposes: this was a bug in the batch processing that has been addressed since.
这篇关于获取统一组图像时批量 JSON 格式错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!