What gets converted
This converter does one job: it turns a JSON file into a Markdown file that displays the JSON well. It does not turn your data into headings, lists or tables. Here is exactly what happens, checked against the converter code.
| JSON input | Converted? | Markdown output |
|---|---|---|
| Valid JSON of any shape | Yes | Pretty-printed with two-space indentation inside a ```json fenced code block |
| Minified, one-line JSON | Yes | Expanded onto multiple lines |
| Nested objects and arrays | Yes | Indented two spaces per level |
| Key order | Yes | Kept as in the file |
Unicode escapes such as é |
Yes | Written as the character itself (é) |
Numbers such as 1.0 or 1e3 |
Partial | Rewritten in their shortest form (1, 1000) |
| Integers above 9,007,199,254,740,991 | Partial | Rounded, because JavaScript numbers lose precision past that point |
| Duplicate keys in one object | Partial | Only the last value is kept |
Keys named __proto__, constructor or prototype |
No | Dropped while parsing, for safety |
| Invalid JSON, JSON with comments or trailing commas | No formatting | Wrapped in a json code block exactly as written |
| Arrays of records | No table | Kept as JSON. For a table, see the CSV tip below. |
The JSON is only reformatted when it parses, so a file that comes out unchanged is a sign it isn't valid JSON.