mirror of
https://github.com/nlohmann/json.git
synced 2026-10-07 15:07:13 +00:00
to_cbor, to_msgpack, and to_ubjson recurse once per nesting level. The parser is iterative, so a value the library accepts can crash on the way back out. Keep the existing recursive path for the first 128 levels and finish anything deeper on a heap stack. Output is unchanged. BSON is left alone because its extra size walk is a separate change. Rebased onto the value-type output sink. The heap frames now initialize every member, which is what -Weffc++ was rejecting. See #5392. Signed-off-by: ayush-singh-0601 <singhayush062006@gmail.com>