python - 这是什么类型的 JSON 对象? (Gitlab API), (Python)

标签 python json gitlab

我使用 GitLab 的文件存储库 API 访问文件的内容,在我点击一个特定文件(任何文本文件)之前,一切似乎都很顺利。

{:file_name=>"requirements.txt", :file_path=>"requirements.txt", :size=>30, :encoding=>"base64", :content=>"ImZsYXNrIgoidXdzZ2kiCiJnb2dvc2VjcmV0cyIK", :ref=>"master", :blob_id=>"7f551dddd4fd8931419450fb357bad83d2efbe6a", :commit_id=>"40e161fcb323be28259712a6cf5da8fddfda80e1", :last_commit_id=>"40e161fcb323be28259712a6cf5da8fddfda80e1"}

我从未在键前见过冒号,也从未在 JSON 对象中见过“=>”。返回的所有其他 JSON 对象都没有问题。向 API 发出的请求没有错误,因为返回了 200 响应。

这是什么??

最佳答案

这似乎是 Gitlab 中的一个 Unresolved 错误。参见 https://gitlab.com/gitlab-org/gitlab-ee/issues/2298 .

What is the current bug behavior?

Response:

{:file_path=>"Readme.txt", :branch=>"master"}

What is the expected correct behavior?

Response:

{"file_name": "Readme.txt", "branch": "master"}

关于python - 这是什么类型的 JSON 对象? (Gitlab API), (Python),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45002102/

相关文章:

python - 后续: missing required Charfield in django Modelform is saved as empty string and do not raise an error

python - `s`中的 `%s`在字符串格式中是什么意思?

c# - 如何创建返回字符串列表的 RavenDB 索引?

json - 下拉列表无法从对象中提取数字值(Angular 4)

GitLab 持续部署到 Azure Web 应用程序

python - 将 float 组渲染为 24 位 RGB 图像(例如使用 PIL)

Python 看不到我的子包

java - 如何使用 gson 解析 Freebase 主题 api 响应

continuous-integration - Gitlab 持续交付选项

gitlab - 使用git存储库中的标签标记docker镜像