Files
json/include
Niels Lohmann 9181e24f52 Fix quadratic parent updates for ordered_json with JSON_DIAGNOSTICS
set_parent() re-parented the whole container for ordered_json on every
call (push_back, emplace_back, at(), operator[] on existing keys),
making array building quadratic. at() and array append now set only the
one child's parent; object insertion re-parents only if the vector
capacity changed. Also drop the redundant set_parents() in the copy
constructor. Adds a parent-pointer invariant test.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2026-10-14 22:18:39 +02:00
..