This commit is contained in:
nlohmann
2026-08-25 06:20:12 +00:00
parent 834c855608
commit da193612a8
256 changed files with 276 additions and 255 deletions
File diff suppressed because one or more lines are too long
+10
View File
@@ -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
```