I am using Sphinx to document a web service. I would like to show a formatted JSON web response using the code-block directive, which Spinx does via Pygments, but JSON doesn't have a syntax highlighter in Pygments. What language do you suggest I specify instead? HTML? JavaScript?
.. code-block:: javascript
{
"name": "roger",
"score": 100
}
I am using Sphinx 1.4.2 which includes a Pygments lexer called "json". This is available out-of-the-box by default. To use:
.. code-block:: json
{
"key": "value",
"key2": "value2",
...
}