Files
json/docs
Niels Lohmann cf55a6cb3a Merge #5741 and make keep the default error_handler of the binary writers
Merges claude/binary-utf8-roundtrip-5651, where the writers now only check
UTF-8 if JSON_STRICT_BINARY_UTF8 is enabled, and applies the same rule to
the error_handler parameter added here: to_cbor(), to_ubjson(),
to_bjdata(), and to_bson() default to error_handler_t::keep, the behavior
of 3.12.0, or to error_handler_t::strict if JSON_STRICT_BINARY_UTF8 is
enabled (detail::binary_writer_default_error_handler()). Passing a handler
explicitly always takes precedence.

- Conflicts in binary_writer.hpp resolved in favor of this branch's
  error_handler, which replaces #5741's check_text_utf8().
- Tests: the "default parameters" section checks that the default equals
  keep; unit-binary_utf8_strict.cpp checks that an explicit handler
  overrides the macro's default.
- Docs: signatures show keep; parameter, exception, and format pages
  describe keep as the default and the macro; the two 3.13.0 version
  history entries of each writer are merged into one.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2026-10-02 08:48:59 +02:00
..
2025-04-11 10:41:14 +02:00
2025-04-11 10:41:14 +02:00

Documentation

Generate documentation

Note on documentation: The source files contain links to the online documentation at https://json.nlohmann.me.
This URL provides the most recent documentation and also applies to previous versions. Documentation for deprecated functions is not removed; instead, it is marked as deprecated.

If you want to view the documentation for a specific tag or commit hash, you can generate it locally as follows (example using tag v3.10.2):

git clone https://github.com/nlohmann/json.git
cd json
git checkout v3.10.2
make install_venv serve -C docs/mkdocs

Open http://127.0.0.1:8000/ in your browser. Replace any URL in the source code that points to https://json.nlohmann.me with http://127.0.0.1:8000 to view the documentation for the selected tag or commit hash.