mirror of
https://github.com/nlohmann/json.git
synced 2026-09-30 14:05:18 +00:00
unit-json_view.cpp: type queries, size, and empty against basic_json; materialize() against parse() (json and ordered_json, generated documents, duplicate keys, 100,000 levels of nesting, parent pointers with JSON_DIAGNOSTICS); parse errors and their messages equal to parse() for malformed inputs and all option combinations; NUL and BOM; borrowed and owned inputs (strings, C strings, literals, vectors, string_view, streams, wide strings, parse_copy, and iterator ranges over pointers, vectors, strings, and lists); reuse with read(); moves; shrink_to_fit() of the index and of the decoded strings; source offsets. unit-json_view_macros.cpp includes the header without JSON_TEST_KEEP_MACROS, as users do: the view must not depend on the macros json.hpp undefines, and must not leak its own. Signed-off-by: Niels Lohmann <mail@nlohmann.me>