Godoc.org support plain-text for integration, why not JSON or XML, that sound a better format for that kind of work.
I see you are using two version of template, one for HTML and one for TXT, so I think I not to hard for a json version.
One more thing:
Instead of using a reuqest header, why not just a parameter?
For example: http://godoc.org/math?format=json/xml/txt/html
Thanks for your great project
If somebody has a specific use for a JSON API that fits with the goals of the project, then I'll add a JSON API. I don't want to implement and support features that are not used.
GoDoc supports plain text output because somebody had a use for it. The plain text output works great for integration with shell scripts.
GoDoc follows the HTTP standard for content negotiation. The HTTP standard uses a header.
If you have a specific need for a JSON API, then please open a new issue describing what you need and how you plan to use it.
I want to add tab completion to the go get command and want to use godoc.org to build the local index. I'd prefer not to scrape, so a json api would be nice. Let me know if I should open a new issue.
Please start a new issue with a description of the request and responses needed for tab completion.