mirror of
https://github.com/nlohmann/json.git
synced 2026-08-29 20:47:14 +00:00
deploy: 01853ed6bc
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -108,6 +108,16 @@ Handling of BSON type 0x11
|
||||
|
||||
This library deserializes BSON type `0x11` (Timestamp) as a `number_unsigned` value. The 64-bit value is preserved, but the Timestamp type information is not.
|
||||
|
||||
Lenient BSON input handling
|
||||
|
||||
The BSON reader is lenient in a few areas where the BSON specification is more restrictive:
|
||||
|
||||
- array element keys are not checked against the required decimal sequence (`0`, `1`, `2`, ...),
|
||||
- any non-zero byte is accepted as `true` for the boolean type, and
|
||||
- the payload for binary subtype `0x02` is returned as-is, including its inner length prefix.
|
||||
|
||||
If BSON input must be validated for strict specification compliance, validate it separately before passing it to `from_bson()`.
|
||||
|
||||
Example
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user