From d97ea0b1634d59ec6f28881b860fb8b2d8ac78a1 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 25 Oct 2026 20:04:23 +0100 Subject: [PATCH] docs: use the Oxford comma, drop discarded-value remarks Add the serial comma in a list added by this PR and remove the BSON example of type_error.321 (with the type_error.317 remark) so the docs do not mention discarded values for BSON; restore the original singular heading of that section. No tables were changed by this PR. Signed-off-by: Niels Lohmann --- docs/mkdocs/docs/api/byte_container_with_subtype/index.md | 2 +- docs/mkdocs/docs/home/exceptions.md | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/docs/mkdocs/docs/api/byte_container_with_subtype/index.md b/docs/mkdocs/docs/api/byte_container_with_subtype/index.md index 2999d732b..f3a2cc9a3 100644 --- a/docs/mkdocs/docs/api/byte_container_with_subtype/index.md +++ b/docs/mkdocs/docs/api/byte_container_with_subtype/index.md @@ -6,7 +6,7 @@ class byte_container_with_subtype : public BinaryType; ``` This type extends the template parameter `BinaryType` provided to [`basic_json`](../basic_json/index.md) with a subtype -used by BSON, CBOR and MessagePack. This type exists so that the user does not have to specify a type themselves with a +used by BSON, CBOR, and MessagePack. This type exists so that the user does not have to specify a type themselves with a specific naming scheme in order to override the binary type. ## Template parameters diff --git a/docs/mkdocs/docs/home/exceptions.md b/docs/mkdocs/docs/home/exceptions.md index d9aea4420..9ac2fffc0 100644 --- a/docs/mkdocs/docs/home/exceptions.md +++ b/docs/mkdocs/docs/home/exceptions.md @@ -906,19 +906,13 @@ value, or by default-constructing a [`basic_json`](../api/basic_json/index.md) w [`value_t::discarded`](../api/basic_json/value_t.md)) was passed to a binary serialization function, either directly or nested in an array or object. There is no way to represent a discarded value in CBOR, MessagePack, UBJSON, BJData, BSON, or BON8. -!!! failure "Example messages" +!!! failure "Example message" Serializing `#!json [1, 2]` to CBOR, where the second element was discarded by a parser callback: ``` [json.exception.type_error.321] cannot serialize discarded value to CBOR ``` - Serializing an object with a discarded member to BSON (a discarded value at the top level is reported as - [`type_error.317`](#jsonexceptiontype_error317) instead, since BSON requires an object there): - ``` - [json.exception.type_error.321] cannot serialize discarded value to BSON - ``` - ## Out of range This exception is thrown in case a library function is called on an input parameter that exceeds the expected range, for instance, in the case of array indices or nonexisting object keys.