mirror of
https://github.com/nlohmann/json.git
synced 2026-10-28 08:45:43 +00:00
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:
2 files changed
+4
-7
No files matched your search
@@ -43,8 +43,7 @@ The exact mapping and its limitations are described on a [dedicated page](../../
|
|||||||
## Exception safety
|
## Exception safety
|
||||||
|
|
||||||
Strong guarantee: if an exception is thrown, there are no changes in the JSON value. Bytes that were already written to
|
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
|
the output adapter are not taken back.
|
||||||
[`type_error.321`](../../home/exceptions.md#jsonexceptiontype_error321) is thrown.
|
|
||||||
|
|
||||||
## Exceptions
|
## Exceptions
|
||||||
|
|
||||||
|
|||||||
@@ -95,11 +95,9 @@ see "binary" cells in the table above.
|
|||||||
|
|
||||||
!!! success "Complete mapping"
|
!!! success "Complete mapping"
|
||||||
|
|
||||||
The mapping is **complete** in the sense that any JSON value type can be converted to a CBOR value, with two
|
The mapping is **complete** in the sense that any JSON value type can be converted to a CBOR value, with one
|
||||||
exceptions: a [`discarded`](../../api/basic_json/is_discarded.md) value cannot be serialized and throws
|
exception: an integer outside the range of CBOR integers (only possible with a number type wider than 64 bits)
|
||||||
[`type_error.321`](../../home/exceptions.md#jsonexceptiontype_error321), and an integer outside the range of CBOR
|
throws [`out_of_range.407`](../../home/exceptions.md#jsonexceptionout_of_range407).
|
||||||
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"
|
!!! info "Not a deterministic encoding"
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user