@Override
	public boolean run(DocletEnvironment env) {

		this.docEnv = env;
		this.docTrees = env.getDocTrees();

		// Create destination directory
		if (destDir == null) {
			log.print(Kind.ERROR, "Destination directory not set");
			return false;
		}
		if (!destDir.exists()) {
			if (!destDir.mkdirs()) {
				log.print(Kind.ERROR, "Failed to create destination directory at: " + destDir);
				return false;
			}
		}

		// Create JSON for all classes
		//@formatter:off
		ElementFilter.typesIn(docEnv.getIncludedElements())
			.stream()
			.filter(el -> el.getKind().equals(ElementKind.CLASS) || el.getKind().equals(ElementKind.INTERFACE))
			.forEach(el -> writeJsonToFile(classToJson(el), el.getQualifiedName()));
		//@formatter:on

		return true;
	}
Doclet that outputs javadoc in JSON format (instead of HTML).  Things like Python can then
read in the JSON and easily access all of the javadoc elements.

To run: gradle zipJavadocs
GhidraBuild/BuildFiles/Doclets/src/main/java/ghidra/doclets/json/JsonDoclet.java