docs: drop discarded-value remarks

Remove the mention that a discarded value cannot be serialized to CBOR
(type_error.321) from the exception-safety and mapping sections. The
integer table and all added prose already follow the table-format and
Oxford-comma rules.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann committed 2026-10-25 20:05:23 +01:00
1 parent 8c4818d5f7
commit 34f9be2aa2
2 files changed
+4 -7

No files matched your search

+1 -2
View File
@@ -43,8 +43,7 @@ The exact mapping and its limitations are described on a [dedicated page](../../
## Exception safety
Strong guarantee: if an exception is thrown, there are no changes in the JSON value. Bytes that were already written to
the output adapter are not taken back; for `[1,2,<discarded>]`, three bytes are written before
[`type_error.321`](../../home/exceptions.md#jsonexceptiontype_error321) is thrown.
the output adapter are not taken back.
## Exceptions
@@ -95,11 +95,9 @@ see "binary" cells in the table above.
!!! success "Complete mapping"
The mapping is **complete** in the sense that any JSON value type can be converted to a CBOR value, with two
exceptions: a [`discarded`](../../api/basic_json/is_discarded.md) value cannot be serialized and throws
[`type_error.321`](../../home/exceptions.md#jsonexceptiontype_error321), and an integer outside the range of CBOR
integers (only possible with a number type wider than 64 bits) throws
[`out_of_range.407`](../../home/exceptions.md#jsonexceptionout_of_range407).
The mapping is **complete** in the sense that any JSON value type can be converted to a CBOR value, with one
exception: an integer outside the range of CBOR integers (only possible with a number type wider than 64 bits)
throws [`out_of_range.407`](../../home/exceptions.md#jsonexceptionout_of_range407).
!!! info "Not a deterministic encoding"