doc2json is a utility Python script that allows us you
to convert API documentation pages (as those generated by automated tools,
such as javadoc) into JSON document files.
doc2json currently handles API docs generated by the following tools:
pip install .doc2json --help
usage: doc2json [-h] [--language {java,kotlin,scala}] -o OUTPUT -i INPUT [--jdk-docs]
optional arguments:
-h, --help show this help message and exit
--language {java,kotlin,scala}
Language associated with the given API docs
-o OUTPUT, --output OUTPUT
Directory to output JSON files
-i INPUT, --input INPUT
Input directory of API docs
--jdk-docs Indicate whether the documentation is related to JDK
Parse documentation pages of the java.util Java package:
doc2json --language java -i examples/java/html-docs/java/util \
-o json-docs --jdk-docsThe script above creates a directory named java-docs
that contains all generated JSON documentents.