Title the macro examples and add JSON_STRICT_BINARY_UTF8 to the docset

The documentation style check requires "Example: ..." titles on pages with several examples (#5741, #5591) and a docset entry for every macro page.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann
2026-10-04 14:50:19 +02:00
parent 3173c28dac
commit 5d47284e6c
3 changed files with 5 additions and 4 deletions
@@ -54,7 +54,7 @@ The default value is `0` (disabled, the behavior of version 3.12.0 and earlier i
## Examples
??? example "Default behavior (macro not defined)"
??? example "Example: default behavior (macro not defined)"
Without the macro, the bytes are written unchanged:
@@ -70,7 +70,7 @@ The default value is `0` (disabled, the behavior of version 3.12.0 and earlier i
}
```
??? example "Opt-in check (macro defined to 1)"
??? example "Example: opt-in check (macro defined to 1)"
With the macro, ill-formed UTF-8 is rejected:
@@ -44,7 +44,7 @@ By default, implicit conversions are enabled.
## Examples
??? example
??? example "Example: implicit conversion"
This is an example for an implicit conversion:
@@ -61,7 +61,7 @@ By default, implicit conversions are enabled.
auto s = j.get<std::string>();
```
??? example "Conversion between `basic_json` specializations"
??? example "Example: conversion between `basic_json` specializations"
A `basic_json` specialization with a different string type is also no longer converted implicitly when
`JSON_USE_IMPLICIT_CONVERSIONS` is defined to `0`: