How to style a JSON block in Github Wiki?

HP. picture HP. · Feb 15, 2013 · Viewed 165.8k times · Source

Is there a way to nicely format/style JSON code in Github Wiki (i.e Markdown preferred)?

Something like this with few colors (or bold) and correct indentation:

http://www.freeformatter.com/json-formatter.html#ad-output

Answer

nulltoken picture nulltoken · Feb 15, 2013

Some color-syntaxing enrichment can be applied with the following blockcode syntax

```json
Here goes your json object definition
```

Note: This won't prettify the json representation. To do so, one can previously rely on an external service such as jsbeautifier.org and paste the prettified result in the wiki.