{"action":"created","issue":{"url":"https://api.github.com/repos/tripit/slate/issues/351","labels_url":"https://api.github.com/repos/tripit/slate/issues/351/labels{/name}","comments_url":"https://api.github.com/repos/tripit/slate/issues/351/comments","events_url":"https://api.github.com/repos/tripit/slate/issues/351/events","html_url":"https://github.com/tripit/slate/issues/351","id":110734968,"number":351,"title":"XML/JSON response documentation","user":{"login":"rwdaigle","id":1012,"avatar_url":"https://avatars.githubusercontent.com/u/1012?v=3","gravatar_id":"","url":"https://api.github.com/users/rwdaigle","html_url":"https://github.com/rwdaigle","followers_url":"https://api.github.com/users/rwdaigle/followers","following_url":"https://api.github.com/users/rwdaigle/following{/other_user}","gists_url":"https://api.github.com/users/rwdaigle/gists{/gist_id}","starred_url":"https://api.github.com/users/rwdaigle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwdaigle/subscriptions","organizations_url":"https://api.github.com/users/rwdaigle/orgs","repos_url":"https://api.github.com/users/rwdaigle/repos","events_url":"https://api.github.com/users/rwdaigle/events{/privacy}","received_events_url":"https://api.github.com/users/rwdaigle/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tripit/slate/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-10-09T20:59:36Z","updated_at":"2015-10-12T21:37:42Z","closed_at":"2015-10-12T21:37:42Z","body":"Hi, I probably have more of a question than issue, but here it goes:\r\n\r\nMy API has two response formats, XML and JSON. I'd like to have the code column of my API docs show the curl commands required for each format (which do differ since one has an XML request body and one has a JSON request body) along with the response.\r\n\r\nSo the JSON column would look like this:\r\n\r\n![](https://photos-3.dropbox.com/t/2/AAD_vYuJsxGS9qUGoY_E_XQM9MgyTbWCupjoTdWz5MX3Gw/12/264878654/png/32x32/1/1444428000/0/2/Screenshot%202015-10-09%2016.50.44.png/CL70pn4gASACIAMgBiAHKAIoBw/RNeePv9R12SykXrDEf2Y_TbgBHCsBU7N8euRrf6-IyQ?size_mode=5)\r\n\r\nand the XML column like this:\r\n\r\n![](https://photos-6.dropbox.com/t/2/AAAvFvMFpNf2ipoU93h6SvTqrdO8PCLLOswvDcHN3OLRvg/12/264878654/png/32x32/1/1444428000/0/2/Screenshot%202015-10-09%2016.55.22.png/CL70pn4gASACIAMgBiAHKAIoBw/5vM71TOy0LD-7Ha6Ge-4pAbKR1nRVWVSd9kjFDCyeqg?size_mode=5)\r\n\r\nThe `shell` section that goes with each response format should be syntax highlighted and only displayed when the right column is selected. Is there a way to tie the `shell` code blocks with their respective response?\r\n\r\nThe closest I've seen to something like this are the [hosting.de](https://www.hosting.de/docs/api/?json-doc#delete-a-domain) docs which has a format-specific URL that's displayed with each response format, but I'm not even sure how they're doing that.\r\n\r\nAny pointers would be appreciated!\r\n\r\nSlate is a great project. So much thanks are due to helping out the sad state of API docs that exist out there..."},"comment":{"url":"https://api.github.com/repos/tripit/slate/issues/comments/147528978","html_url":"https://github.com/tripit/slate/issues/351#issuecomment-147528978","issue_url":"https://api.github.com/repos/tripit/slate/issues/351","id":147528978,"user":{"login":"rwdaigle","id":1012,"avatar_url":"https://avatars.githubusercontent.com/u/1012?v=3","gravatar_id":"","url":"https://api.github.com/users/rwdaigle","html_url":"https://github.com/rwdaigle","followers_url":"https://api.github.com/users/rwdaigle/followers","following_url":"https://api.github.com/users/rwdaigle/following{/other_user}","gists_url":"https://api.github.com/users/rwdaigle/gists{/gist_id}","starred_url":"https://api.github.com/users/rwdaigle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwdaigle/subscriptions","organizations_url":"https://api.github.com/users/rwdaigle/orgs","repos_url":"https://api.github.com/users/rwdaigle/repos","events_url":"https://api.github.com/users/rwdaigle/events{/privacy}","received_events_url":"https://api.github.com/users/rwdaigle/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T21:37:42Z","updated_at":"2015-10-12T21:37:42Z","body":"Thanks @pnerger. However, even the URL differs for XML vs. JSON so the base curl command can't be shared. And pretty close == a bunch of red invalid syntax highlighting in the case of JSON so that's a no go.\r\n\r\nLooks like there's not a great way to do this - thanks for your pointers, though!"}}