mirror of
https://github.com/nlohmann/json.git
synced 2026-09-06 16:27:59 +00:00
Issue #5333 documented three intentionally-lenient behaviors of the BSON reader (any non-zero byte accepted as a boolean `true`, BSON array element keys not validated against the required decimal sequence, and the payload of binary subtype 0x02 "old binary" returned as-is including its inner length prefix), but none of them was pinned by a test, so a future change could silently regress the documented behavior. Also add coverage for the out_of_range.412 length-overflow check (shared by binary, string, and (sub-)document BSON length fields) for the string and document cases; only the binary case was previously tested. Signed-off-by: Niels Lohmann <mail@nlohmann.me>