Can you describe your starting point and goals a bit more? It looks like you may be trying to autodoc source code in json format?
If that is the case, then you might want to look at the source for the napolean extension (well, it is built into sphinx now). https://pypi.python.org/pypi/sphinxcontrib-napoleon That seems to get all of the data you want. Or instead of building a new builder, you could use the napolean extension to build your documents and output it in xml or pseudoxml, then post process the output in the above format (xml -> json isn't too difficult). On Wednesday, September 7, 2016 at 7:18:02 AM UTC-7, Thomas Schultz wrote: > > Hello! > > I'm working on a project that has sphinx generated documentation and we > are trying to also make a JSON output of these docs with a very specific > format. > > > Example of desired JSON output: > { > "description": "\n Define API Queries.", > "examples": [], > "id": "google.cloud.bigquery.query.queryresults", > "methods": [{ > "examples": [], > "exceptions": [], > "id": "google.cloud.bigquery.query.QueryResults.__init__", > "name": "__init__", > "params": [], > "returns": [], > "source": "google/cloud/bigquery/query.py#L60", > "type": "instance" > }, { > "examples": [], > "exceptions": [], > "id": "google.cloud.bigquery.query.QueryResults.fetch_data", > "name": "fetch_data", > "params": [{ > "description": " token representing a cursor into the table's > rows.", > "name": "page_token", > "nullable": null, > "optional": null, > "types": ["string or NoneType"] > }] > }] > } > > > I attempted to make a custom builder for this a while ago but I wasn't > able to access the above pieces of data in a predictable way. > > If you have any resources you could point me towards or suggestions, I > would be very grateful! > > > Thank you! > -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users+unsubscr...@googlegroups.com. To post to this group, send email to sphinx-users@googlegroups.com. Visit this group at https://groups.google.com/group/sphinx-users. For more options, visit https://groups.google.com/d/optout.