mirror of
https://github.com/nlohmann/json.git
synced 2026-10-31 09:55:42 +00:00
A json_view or json_document decodes a macro-defined struct directly and looks the members up by their decoded keys. Only plain keys were covered so far. The new section decodes structs defined with NLOHMANN_DEFINE_TYPE_INTRUSIVE, ..._WITH_DEFAULT and ..._WITH_NAMES from documents whose keys contain escape sequences, and compares the result with the conversion of the materialized value. It also pins the difference for a duplicate key written once plain and once escaped (the view takes the first member, the materialized value keeps the last one), and that an escaped backslash is part of the decoded key. Signed-off-by: Niels Lohmann <mail@nlohmann.me>