Skip to content

Commit 7bf9a06

Browse files
committed
📝 update documentation after merging #4590
Signed-off-by: Niels Lohmann <[email protected]>
1 parent a3dcdd5 commit 7bf9a06

File tree

2 files changed

+12
-19
lines changed

2 files changed

+12
-19
lines changed

docs/mkdocs/docs/features/binary_formats/bson.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,8 @@ The library uses the following mapping from JSON values types to BSON types:
3232

3333
!!! warning "Incomplete mapping"
3434

35-
The mapping is **incomplete**, since only JSON-objects (and things
36-
contained therein) can be serialized to BSON.
37-
Also, integers larger than 9223372036854775807 cannot be serialized to BSON,
38-
and the keys may not contain U+0000, since they are serialized a
39-
zero-terminated c-strings.
35+
The mapping is **incomplete**, since only JSON-objects (and things contained therein) can be serialized to BSON.
36+
Also, keys may not contain U+0000, since they are serialized a zero-terminated c-strings.
4037

4138
??? example
4239

@@ -82,6 +79,10 @@ The library maps BSON record types to JSON value types as follows:
8279

8380
The mapping is **incomplete**. The unsupported mappings are indicated in the table above.
8481

82+
!!! note "Handling of BSON type 0x11"
83+
84+
BSON type 0x11 is used to represent uint64 numbers. This library treats these values purely as uint64 numbers
85+
and does not parse them into date-related formats.
8586

8687
??? example
8788

@@ -94,8 +95,3 @@ The library maps BSON record types to JSON value types as follows:
9495
```json
9596
--8<-- "examples/from_bson.output"
9697
```
97-
98-
!!! note "Handling of BSON type 0x11"
99-
100-
BSON type 0x11 is used to represent uint64 numbers. This library treats these values purely as uint64 numbers
101-
and does not parse them into date-related formats.

docs/mkdocs/docs/home/exceptions.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -839,17 +839,14 @@ A parsed number could not be stored as without changing it to NaN or INF.
839839

840840
### json.exception.out_of_range.407
841841

842-
UBJSON only support integer numbers up to 9223372036854775807.
842+
This exception previously indicated that the UBJSON and BSON binary formats did not support integer numbers greater than
843+
9223372036854775807 due to limitations in the implemented mapping. However, these limitations have since been resolved,
844+
and this exception no longer occurs.
843845

844-
!!! failure "Example message"
845-
846-
```
847-
number overflow serializing '9223372036854775808'
848-
```
849-
850-
!!! note
846+
!!! success "Exception cannot occur any more"
851847

852-
Since version 3.9.0, integer numbers beyond int64 are serialized as high-precision UBJSON numbers, and this exception does not further occur.
848+
- Since version 3.9.0, integer numbers beyond int64 are serialized as high-precision UBJSON numbers.
849+
- Since version 3.12.0, integer numbers beyond int64 are serialized as uint64 BSON numbers.
853850

854851
### json.exception.out_of_range.408
855852

0 commit comments

Comments
 (0)