2022-07-31 13:22:22 +08:00
|
|
|
// __ _____ _____ _____
|
|
|
|
// __| | __| | | | JSON for Modern C++ (supporting code)
|
2022-08-02 05:27:58 +08:00
|
|
|
// | | |__ | | | | | | version 3.11.1
|
2022-07-31 13:22:22 +08:00
|
|
|
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
|
|
|
|
//
|
|
|
|
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
2022-07-31 03:59:13 +08:00
|
|
|
#undef JSON_DIAGNOSTICS
|
|
|
|
#define JSON_DIAGNOSTICS 0
|
|
|
|
#include <nlohmann/json.hpp>
|
|
|
|
|
|
|
|
#include "diag.hpp"
|
|
|
|
|
|
|
|
std::size_t json_sizeof_diag_off()
|
|
|
|
{
|
|
|
|
return sizeof(nlohmann::json);
|
|
|
|
}
|
|
|
|
|
|
|
|
std::size_t json_sizeof_diag_off_explicit()
|
|
|
|
{
|
|
|
|
return sizeof(::NLOHMANN_JSON_NAMESPACE::json);
|
|
|
|
}
|
|
|
|
|
|
|
|
void json_at_diag_off()
|
|
|
|
{
|
|
|
|
using nlohmann::json;
|
|
|
|
json j = json{{"foo", json::object()}};
|
|
|
|
j.at(json::json_pointer("/foo/bar"));
|
|
|
|
}
|