Skip to content

Fix documentation gaps found in a full GitHub Discussions review#5264

Merged
nlohmann merged 2 commits into
developfrom
claude/discussions-doc-fixes
Jul 10, 2026
Merged

Fix documentation gaps found in a full GitHub Discussions review#5264
nlohmann merged 2 commits into
developfrom
claude/discussions-doc-fixes

Conversation

@nlohmann

Copy link
Copy Markdown
Owner

Summary

Reviewed all 1008 GitHub Discussions (2020–2026) to find recurring questions that better or more visible documentation would have avoided. This PR addresses ~26 distinct gaps identified in that review:

  • New Debugging page collecting natvis, GDB pretty printer, LLDB status, and JSON_DIAGNOSTICS (previously scattered/undiscoverable)
  • Thread-safety and schema-validation FAQ entries
  • StringType's char-based requirement (no wstring/u16string/u32string)
  • Brace-initialization-yields-arrays warning directly on the constructor reference page (previously only in the FAQ)
  • std::any exclusion from get<T>(), with a manual-dispatch example
  • Non-string-keyed std::map serializing as an array of pairs
  • ordered_json compatibility with NLOHMANN_DEFINE_TYPE_* macros (already worked, was undocumented)
  • std::array truncation on size-mismatched conversion (no exception)
  • static_cast vs. get<std::optional<T>>() divergence
  • Recipe for omitting a std::optional field instead of emitting null
  • No built-in nesting-depth limit during parsing, plus a callback-based workaround recipe
  • Recipe for streaming a large homogeneous array via parser callbacks
  • operator>> stream-position semantics for concatenated JSON values
  • JSON Pointer array-vs-object creation rule for non-existing paths
  • CMake target name (nlohmann_json_modules) needed to link C++20 modules
  • ESP-IDF/PlatformIO: no official package, link to a community fork
  • get(key, default) as the Python dict.get() equivalent
  • reserve() recipe for pre-allocating array capacity
  • JSONC as an alias for the existing ignore_comments/ignore_trailing_commas combination (distinct from the unsupported JSON5)
  • items() dereferenced-element type: decltype() idiom + detail-namespace stability caveat
  • Various macro/type-conversion limitations (MSGPACK_DEFINE_ARRAY equivalent, char-array round-tripping, ADL serializer macro gap)

Each change traces back to a specific discussion thread; see the commit message for the full list.

Test plan

  • Verified all new/modified relative markdown links resolve to existing files
  • mkdocs.yml nav change reviewed for correct indentation (no local mkdocs build available to fully render the site)
  • CI docs build / link-check (if any) — pending

This PR was written by Claude Code as part of a broader GitHub Discussions review requested by @nlohmann.

Reviewed all 1008 GitHub Discussions (2020-2026) for recurring questions
that better or more visible documentation would have avoided. Adds/expands
documentation for ~26 distinct gaps, including:

- New "Debugging" page collecting natvis, GDB pretty printer, LLDB status,
  and JSON_DIAGNOSTICS pointers (previously scattered/undiscoverable)
- Thread-safety and schema-validation FAQ entries
- StringType's char-based requirement (no wstring/u16string/u32string)
- Brace-initialization-yields-arrays warning directly on the constructor
  reference page (previously only in the FAQ, missed by users reading
  the constructor docs)
- std::any exclusion from get<T>(), with a manual-dispatch example
- Non-string-keyed std::map serializing as an array of pairs
- ordered_json compatibility with NLOHMANN_DEFINE_TYPE_* macros
  (already worked, was undocumented)
- std::array truncation on size-mismatched conversion (no exception)
- static_cast vs. get<std::optional<T>>() divergence
- Recipe for omitting a std::optional field instead of emitting null
- No built-in nesting-depth limit during parsing + a callback-based
  workaround recipe
- Recipe for streaming a large homogeneous array via parser callbacks
- operator>> stream-position semantics for concatenated JSON values
- JSON Pointer array-vs-object creation rule for non-existing paths
- CMake target name (nlohmann_json_modules) needed to link C++20 modules
- ESP-IDF/PlatformIO: no official package, link to a community fork
- get(key, default) as the Python dict.get() equivalent
- reserve() recipe for pre-allocating array capacity
- JSONC as an alias for the existing ignore_comments/ignore_trailing_commas
  combination (distinct from the unsupported JSON5)
- items() dereferenced-element type: decltype() idiom + detail-namespace
  stability caveat
- Various macro/type-conversion limitations (MSGPACK_DEFINE_ARRAY
  equivalent, char-array round-tripping, ADL serializer macro gap)

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
@nlohmann nlohmann force-pushed the claude/discussions-doc-fixes branch from 0cecc58 to 990ed2d Compare July 10, 2026 11:39
@nlohmann nlohmann added this to the Release 3.13.0 milestone Jul 10, 2026
@nlohmann nlohmann added the 🚀 ready to merge Ready to merge - just waiting for CI to complete. label Jul 10, 2026
@nlohmann nlohmann merged commit e9c3985 into develop Jul 10, 2026
155 checks passed
@nlohmann nlohmann deleted the claude/discussions-doc-fixes branch July 10, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation L 🚀 ready to merge Ready to merge - just waiting for CI to complete.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant