There is official GitHub API which returns data in JSON, but is there any way to return the data in XML format?

JSON format example: https://api.github.com/repos/github/github-services/issues


Unfortunately there doesn't seem to be a way to do that. Even when setting the Accept Header to xml, the API returns JSON:

$ curl -H "Accept: application/vnd.github.v3+xml" https://api.github.com/repos/github/github-services/issues

They parse the xml part of the header correctly, but still return JSON as you can see here:

$ curl -I -H "Accept: application/vnd.github.full+xml" https://api.github.com/repos/github/github-services/issues
Content-Type: application/json; charset=utf-8
X-GitHub-Media-Type: github.v3; param=full; format=xml

The reference mentions only JSON.

In their blog, they write something about xml, but the linked guide is dead. Setting the API version to v1 or v2 in the queries above doesn't help either.

Maybe there's an external service to convert the output to XML, but I haven't found one.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.