I notice that Sphinx has the ability to generate documentation in JSON. What are these files used for?
I assume you're talking about the SerializingHTMLBuilder, in which case I think the answer might be that there isn't necessarily a specific purpose in mind. Rather many things provide conversion routines of various kinds with a "loads/dumps" API convention, and the json
module (known as simplejson
before it was brought standard library in 2.6) is but one of many such packages.
Presumably some people would prefer to work with data in JSON format for their own purposes. If I were trying to build some sort of dynamic Javascripty documentation system, I could well imagine choosing to use JSON as the way to get documentation from the backend out to the client in a manageable format, if for some reason HTML or XML didn't seem like the better option.
As the docs say, it's
for use of a web application (or custom postprocessing tool) that doesn’t use the standard HTML templates.
json's a good simple way for language-agnostic data interchange, so, why not?-)