mirror of
https://github.com/nlohmann/json.git
synced 2026-11-13 15:35:23 +00:00
untrusted_input.md did not say that indented dump() and flatten() produce results that grow with the nesting depth times the size of the value (80 KB of input give 600 MB of dump(1)), nor that the binary readers take quadratic time for objects with many keys when they read into ordered_json. Add a warning to "Nesting depth", a section "Objects with many keys in ordered_json", and both points to the checklist. The warning in ordered_map.md still said that parsing JSON text into ordered_json is quadratic; that is no longer true. Name the cases that still are (filling an object key by key, the binary readers) and replace the table with current measurements. dump.md and flatten.md called their complexity linear in the value; it is linear in the result, which can be larger by a factor of the depth. Fixes #6108. Refs #6104. Signed-off-by: Niels Lohmann <mail@nlohmann.me>