@the-starport/doxygen-to-json
v0.1.0
Published
Converts Doxygen XML output to structured JSON for use in documentation tooling.
Downloads
27
Readme
doxygen-to-json
A TypeScript CLI that parses Doxygen XML output and emits structured JSON for use by the nodebb-plugin-mdx-page-renderer ApiClass, ApiEnum, and ApiMacro components.
Installation / usage
Run via npx without installing:
# Parse XML + emit JSON + bundle artifact (primary CI command)
npx doxygen-to-json build \
--xml ./doxygen-xml \
--content ./docs \
--output ./dist \
--version 1.2.3
# Parse only - write JSON files without bundling
npx doxygen-to-json parse --xml ./doxygen-xml --output ./doxygen-json
# Bundle only - JSON and MDX already prepared
npx doxygen-to-json bundle \
--content ./docs \
--doxygen ./doxygen-json \
--output ./dist \
--version 1.2.3--large-files
Available on build and parse. Raises the XML entity expansion limit from the default (1000) to 1,000,000.
Pass this flag when your headers include generated files with large numbers of #define macros
(for example font icon headers or generated constant tables).
Without it, fast-xml-parser will throw Entity expansion limit exceeded when processing those files.
If you hit this error and don't want to use the flag globally, the cleaner fix is to exclude
the problematic headers from your Doxyfile with EXCLUDE_PATTERNS.
Output format
The build command produces dist/docs-{version}.tar.gz with this layout:
content/ <- Copied from --content
doxygen/
classes/Name.json
enums/Name.json
macros/Name.jsonClass JSON schema (key fields): name, kind, brief, functions, fields, baseClasses
Enum JSON schema (key fields): name, brief, values
Macro JSON schema (key fields): name, brief, params, expansion, header
Programmatic API
import { parseDoxygenXml, emitJson } from 'doxygen-to-json';See src/index.ts for the full list of exported types and functions.
AI usage policy
This project was developed with the assistance of AI tools (Claude). All AI-generated code was reviewed and tested manually before being committed. AI assistance is disclosed transparently via co-author commit tags.
Licence
This project is licensed under the GNU Affero General Public License v3.0.
