Generates JSON documentation for Elixir and Erlang projects.
The formatter writes a single <project name>.json file (the project name
is downcased) to the configured output directory.
Top-level information
about- Indicates the version of the JSON structure format.name- Project nameversion- Project versiondescription- Project summary descriptionhomepage_url- Specifies the project's home pagesource_url- Specifies the project's source code locationlanguage- Identifies the primary language of the documents.icon- Path to the project's logo, as given in the:logooptionitems- This JSON object contains modules, exceptions, protocols, behaviours, Mix tasks, and extras details.
Modules, Exceptions, Protocols, Behaviours, and Mix tasks
Each component is an array of objects that include:
id- Module identifier, as used by ExDoc in file names and linksmodule- Module nametitle- Module titlenested_title- Module title when nested under a prefix, see the:nest_modules_by_prefixoptionnested_context- The prefix the module is nested undergroup- Specifies the group, see the:groups_for_modulesoptiontype- Specifies if the component is a module, exception, etc.language- The ExDoc language module used to extract the documentationdeprecated- Deprecation reason, if anyannotations- Module annotationsdoc_format- Format of the documentation, such astext/markdownsource_doc- Module documentation, in its source format, by language (for instance{"en": "..."});"none"or"hidden"otherwisedoc_line- Line number where the module documentation startssource_path- Path to the source code file in the projectsource_url- URL to the source codedocs_groups- Titles of the groups that have members, in display orderdocs- Functions, macros, and callbackstypespecs- Types
Function, callback, and type details
id- Identifier, unique within the module, such as"example/2","c:handle_call/3"or"t:t/0"name- Namearity- Aritytype- Specifies if it is a function, macro, callback, type, etc.signature- Indicates the signaturedefaults- The other arities generated by default arguments, as a list of{"name": ..., "arity": ...}objectsgroup- Title of the group it belongs todeprecated- Deprecation reason, if anyannotations- Annotations, such assince 1.3.0ormacrosource_doc- Documentation, in the same shape as the module onedoc_line- Line number where the documentation startssource_path- Path to the file where the documentation is definedsource_url- URL to the source code
Extras
Each extra page is an object with the following fields:
id- Identifiertitle- Document titlegroup- Specifies the grouptype- Kind of page:extra,cheatmd,livemdorurlsource- The document content in the source formatsource_path- Path of the original documentsource_url- URL of the original document
Extras that link to an external URL have id, title, group, type
(always url), and url instead.
Autolinking
This formatter exports the documentation in its source format, so it
deliberately does not implement the optional ExDoc.Formatter.autolink_options/0
callback. That lets ExDoc skip the autolinking and syntax highlighting
passes, by far the most expensive steps of documentation generation.