Skip to content

docs: modernize doxygen build and publish from this repository - #1711

Merged
baylesj merged 4 commits into
masterfrom
doxygen-modernize
Aug 20, 2026
Merged

docs: modernize doxygen build and publish from this repository#1711
baylesj merged 4 commits into
masterfrom
doxygen-modernize

Conversation

@baylesj

@baylesj baylesj commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

The published API docs live in the separate jsoncpp-docs repo, last updated January 2021 for 1.9.4. The local doxygen build has also been broken since the versioning rework removed the top-level version file. This PR fixes the build, modernizes the output, and publishes docs from this repository via GitHub Pages so they can no longer rot.

Build fixes

  • doxybuild.py reads the version from include/json/version.h instead of a version file that CMake only writes to the build dir.
  • doc/doxyfile.in reduced to non-default settings (the 1.8.5-era template produced 17 obsolete-tag warnings on current doxygen) and now sets WARN_AS_ERROR = FAIL_ON_WARNINGS, so doc regressions fail CI.
  • JSONCPP_DEPRECATED / JSON_API are stripped during preprocessing and __cplusplus=201703L is predefined, so deprecated members and the std::string_view overloads get documented.

Documentation fixes

  • reader.h / writer.h: a mismatched 'settings_\`` quote opened a backtick span that swallowed the rest of each header — CharReaderBuilderandStreamWriterBuilder` were effectively undocumented on the published site.
  • value.h: document the remaining params of Value::get / Value::removeMember.
  • json_value.cpp: hide the private Value::CZString implementation with \cond.

Output

  • Styled with doxygen-awesome-css v2.4.2 (vendored, MIT) instead of the 1.8.13-era header/footer; tree view and search enabled; auto dark mode.
  • README.md is the main page; jsoncpp.dox becomes a "Quick start" page with dead SourceForge links removed. Dropped the 3-line roadmap.dox and the redundant web_doxyfile.in.

Publishing

Test plan

  • python3 doxybuild.py on macOS with doxygen 1.18.0: exit 0, empty warning log (previously 66 warning lines).
  • Verified in generated HTML: README renders as main page (GitHub [!NOTE] alert renders as a doxygen note), Quick start page present, settings_ docs restored on both builders, deprecated getFormatedErrorMessages documented, string_view overloads shown, CZString absent.
  • clang-format --dry-run --Werror clean on touched C++ files; -fsyntax-only passes (changes are comment-only).
  • docs workflow build job passes on this PR.
  • After merge: deploy job publishes to https://open-source-parsers.github.io/jsoncpp/ (Pages has been enabled with source "GitHub Actions"); then redirect + archive jsoncpp-docs.

The API docs were last published to the separate jsoncpp-docs repo in
January 2021 (for 1.9.4) and the local doxygen build has been broken
since the versioning rework removed the top-level `version` file.

Build fixes:
- doxybuild.py reads the version from include/json/version.h instead of
  a `version` file that CMake only generates in the build directory.
- doc/doxyfile.in is reduced to the non-default settings (the 2013-era
  1.8.5 template triggered 17 obsolete-tag warnings on current doxygen)
  and now sets WARN_AS_ERROR so documentation regressions fail the build.
- JSONCPP_DEPRECATED/JSON_API are stripped during preprocessing and
  __cplusplus=201703L is predefined, so deprecated members and the
  std::string_view overloads are documented.

Documentation fixes:
- reader.h / writer.h: a mismatched 'settings_` quote opened a backtick
  span that swallowed the rest of each header, leaving CharReaderBuilder
  and StreamWriterBuilder effectively undocumented.
- value.h: document the remaining parameters of Value::get and
  Value::removeMember.
- json_value.cpp: hide the private Value::CZString implementation from
  doxygen with \cond.

Output:
- Style with doxygen-awesome-css v2.4.2 (vendored, MIT) in place of the
  1.8.13-era header/footer templates; enable tree view and search.
- Use README.md as the main page; jsoncpp.dox becomes a "Quick start"
  page with the dead SourceForge links removed. Drop the 3-line roadmap
  stub and the redundant web_doxyfile.in.

Publishing:
- New docs workflow builds on pull requests (as a warning check) and
  deploys to GitHub Pages on pushes to master with a pinned,
  checksum-verified doxygen 1.18.0. README links now point at
  https://open-source-parsers.github.io/jsoncpp/.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread .github/workflows/docs.yml Fixed
Comment thread .github/workflows/docs.yml Fixed
Comment thread .github/workflows/docs.yml Fixed
Comment thread .github/workflows/docs.yml Fixed
@coveralls

coveralls commented Aug 20, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 32424602421

Coverage remained the same at 89.907%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 2740
Covered Lines: 2615
Line Coverage: 95.44%
Relevant Branches: 2640
Covered Branches: 2222
Branch Coverage: 84.17%
Branches in Coverage %: Yes
Coverage Strength: 23828.01 hits per line

💛 - Coveralls

@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown

Greptile Summary

The PR modernizes JsonCpp’s Doxygen configuration and publishes generated API documentation through GitHub Pages.

  • Reads the project version from include/json/version.h and repairs documentation tarball generation.
  • Adds a warning-enforcing documentation build and a master-only Pages deployment workflow.
  • Updates API comments, documentation links, and presentation using vendored Doxygen styling.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the deployment is now restricted to master, and the documentation tarball no longer references the deleted version or NEWS files.

Important Files Changed

Filename Overview
.github/workflows/docs.yml Adds pinned documentation build and Pages deployment jobs; the current ref guard restricts publishing to master.
doxybuild.py Sources the version from the public version header, improves warning reporting, and removes nonexistent tarball inputs.
doc/doxyfile.in Replaces the obsolete generated template with a concise modern Doxygen configuration that enables strict warnings and themed HTML output.
include/json/reader.h Repairs documentation markup so reader builder documentation renders correctly.
include/json/value.h Completes parameter documentation for existing Value APIs.
include/json/writer.h Repairs documentation markup so writer builder documentation renders correctly.
src/lib_json/json_value.cpp Excludes the private CZString implementation from generated public documentation.

Sequence Diagram

sequenceDiagram
    participant Trigger as Push / PR / Manual Trigger
    participant Build as Documentation Build
    participant Artifact as Pages Artifact
    participant Deploy as Pages Deployment
    Trigger->>Build: Run docs workflow
    Build->>Build: Generate Doxygen HTML
    Build->>Artifact: Upload generated site
    alt ref is master
        Artifact->>Deploy: Deploy to GitHub Pages
    else ref is not master
        Artifact-->>Trigger: Build check only
    end
Loading

Reviews (4): Last reviewed commit: "docs: restrict Pages deploy to master, f..." | Re-trigger Greptile

Comment thread .github/workflows/docs.yml Outdated
Comment thread doxybuild.py
baylesj and others added 3 commits August 20, 2026 15:19
zizmor requires actions pinned to commit SHAs and persist-credentials
off. The caller graph for Json::Value::Value exceeded doxygen's node
limit in CI, which WARN_AS_ERROR turned into a failure; caller graphs of
the implementation add little to API docs, so drop them and leave
headroom in DOT_GRAPH_MAX_NODES for the remaining graphs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
workflow_dispatch from a non-master branch could previously publish that
branch's docs over the production site. The tarball list also still
referenced NEWS.txt and version, neither of which exists in the tree.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@baylesj
baylesj merged commit 3347a4b into master Aug 20, 2026
53 checks passed
@baylesj
baylesj deleted the doxygen-modernize branch August 20, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants