{"$schema":"https://doc-kit.nodejs.org/schemas/api-doc/1.0.1.json","id":"generators-json-simple","path":"/generators/json-simple","type":"module","module":"generators-json-simple","title":"Debug JSON","introducedIn":null,"sourceLink":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"The `json-simple` generator dumps the API entries doc-kit parsed from your\nsources into one JSON file. Almost every other generator reads these entries,\nso when an output looks wrong, this file tells you whether the entry itself is\nwrong or the generator that rendered it.","summary":"The `json-simple` generator dumps the API entries doc-kit parsed from your sources into one JSON file. Almost every other generator reads these entries, so when an output looks wrong, this file tells you whether the entry itself is wrong or the generator that rendered it.","examples":[],"children":[{"kind":"section","id":"usage","name":"Usage","title":"Usage","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"```bash\nnpx @doc-kit/cli generate -t json-simple -i \"docs/**/*.md\" -o out\n```\n\nThis writes `out/api-docs.json`.","summary":"This writes `out/api-docs.json`.","examples":[{"language":"bash","displayName":null,"code":"npx @doc-kit/cli generate -t json-simple -i \"docs/**/*.md\" -o out"}],"children":[]},{"kind":"section","id":"configuring","name":"Configuring","title":"Configuring","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"`json-simple` has no options of its own. It writes to `output`, minified with\n`minify`, both [global options](https://doc-kit.nodejs.org/configuration#global-options).","summary":"`json-simple` has no options of its own. It writes to `output`, minified with `minify`, both global options.","examples":[],"children":[]},{"kind":"section","id":"what-the-dump-holds","name":"What the dump holds","title":"What the dump holds","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"An array of [API entries](https://doc-kit.nodejs.org/generators/metadata), one\nfor each heading in your sources, as the `metadata` stage built them, except\nthat each entry's `content` no longer contains its heading or its stability\nindex, since `heading` and `stability` already hold them. Here is the entry for\nan `fs.readFile()` heading, with every node's `position` and the body's nodes\nleft out:\n\n```json\n{\n  \"api\": \"fs\",\n  \"path\": \"/fs\",\n  \"mdx\": false,\n  \"basename\": \"fs\",\n  \"heading\": {\n    \"type\": \"heading\",\n    \"depth\": 2,\n    \"children\": [\n      {\n        \"type\": \"inlineCode\",\n        \"value\": \"fs.readFile(path[, options], callback)\"\n      }\n    ],\n    \"data\": {\n      \"text\": \"`fs.readFile(path[, options], callback)`\",\n      \"type\": \"method\",\n      \"name\": \"readFile\",\n      \"slug\": \"fsreadfilepath-options-callback\"\n    }\n  },\n  \"added\": \"v0.1.29\",\n  \"content\": { \"type\": \"root\", \"children\": [] }\n}\n```\n\n[What an entry holds](https://doc-kit.nodejs.org/generators/metadata#what-an-entry-holds)\ndescribes every field.\n\n> \\[!WARNING]\n> `api-docs.json` is not a stable format. It has no schema and mirrors\n> doc-kit's internal entries, so its shape changes whenever the pipeline does.\n> To build tools on your API data, use the\n> [`json` generator](https://doc-kit.nodejs.org/generators/json), whose output\n> a versioned schema describes.","summary":"An array of API entries, one for each heading in your sources, as the `metadata` stage built them, except that each entry's `content` no longer contains its heading or its stability index, since `heading` and `stability` already hold them. Here is the entry for an `fs.readFile()` heading, with every node's `position` and the body's nodes left out:","examples":[{"language":"json","displayName":null,"code":"{\n  \"api\": \"fs\",\n  \"path\": \"/fs\",\n  \"mdx\": false,\n  \"basename\": \"fs\",\n  \"heading\": {\n    \"type\": \"heading\",\n    \"depth\": 2,\n    \"children\": [\n      {\n        \"type\": \"inlineCode\",\n        \"value\": \"fs.readFile(path[, options], callback)\"\n      }\n    ],\n    \"data\": {\n      \"text\": \"`fs.readFile(path[, options], callback)`\",\n      \"type\": \"method\",\n      \"name\": \"readFile\",\n      \"slug\": \"fsreadfilepath-options-callback\"\n    }\n  },\n  \"added\": \"v0.1.29\",\n  \"content\": { \"type\": \"root\", \"children\": [] }\n}"}],"children":[]}]}