mirror of
https://github.com/nlohmann/json.git
synced 2026-10-22 14:08:13 +00:00
Array elements are addressed by a plain index of up to 9 digits in nearly all flattened documents. Parse it straight from the key instead of copying the token into a string and converting that. A new container whose first child has the token 0 is an array by definition, so the hash set of array prefixes is only consulted for other first children. unflatten() (instructions on macOS, Linux Ir GCC 13 / Clang 18): canada 188.4M -> 161.1M, 151.3M -> 128.1M / 162.3M -> 138.0M; citm_catalog 45.0M -> 43.3M, 40.3M -> 38.9M / 41.1M -> 39.6M; twitter unchanged. Output and exceptions are identical to develop over the differential check. Signed-off-by: Niels Lohmann <mail@nlohmann.me>