| 1 | // __ _____ _____ _____ |
| 2 | // __| | __| | | | JSON for Modern C++ (supporting code) |
| 3 | // | | |__ | | | | | | version 3.11.3 |
| 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json |
| 5 | // |
| 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> |
| 7 | // SPDX-License-Identifier: MIT |
| 8 | |
| 9 | #undef JSON_DIAGNOSTICS |
| 10 | #define JSON_DIAGNOSTICS 1 |
| 11 | #include <nlohmann/json.hpp> |
| 12 | |
| 13 | #include "diag.hpp" |
| 14 | |
| 15 | std::size_t json_sizeof_diag_on() |
| 16 | { |
| 17 | return sizeof(nlohmann::json); |
| 18 | } |
| 19 | |
| 20 | std::size_t json_sizeof_diag_on_explicit() |
| 21 | { |
| 22 | return sizeof(::NLOHMANN_JSON_NAMESPACE::json); |
| 23 | } |
| 24 | |
| 25 | void json_at_diag_on() |
| 26 | { |
| 27 | using nlohmann::json; |
| 28 | json j = json{{"foo", json::object()}}; |
| 29 | j.at(json::json_pointer("/foo/bar")); |
| 30 | } |