1c5f01b2fSopenharmony_ci// __ _____ _____ _____ 2c5f01b2fSopenharmony_ci// __| | __| | | | JSON for Modern C++ 3c5f01b2fSopenharmony_ci// | | |__ | | | | | | version 3.11.2 4c5f01b2fSopenharmony_ci// |_____|_____|_____|_|___| https://github.com/nlohmann/json 5c5f01b2fSopenharmony_ci// 6c5f01b2fSopenharmony_ci// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me> 7c5f01b2fSopenharmony_ci// SPDX-License-Identifier: MIT 8c5f01b2fSopenharmony_ci 9c5f01b2fSopenharmony_ci#ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_ 10c5f01b2fSopenharmony_ci#define INCLUDE_NLOHMANN_JSON_FWD_HPP_ 11c5f01b2fSopenharmony_ci 12c5f01b2fSopenharmony_ci#include <cstdint> // int64_t, uint64_t 13c5f01b2fSopenharmony_ci#include <map> // map 14c5f01b2fSopenharmony_ci#include <memory> // allocator 15c5f01b2fSopenharmony_ci#include <string> // string 16c5f01b2fSopenharmony_ci#include <vector> // vector 17c5f01b2fSopenharmony_ci 18c5f01b2fSopenharmony_ci// #include <nlohmann/detail/abi_macros.hpp> 19c5f01b2fSopenharmony_ci// __ _____ _____ _____ 20c5f01b2fSopenharmony_ci// __| | __| | | | JSON for Modern C++ 21c5f01b2fSopenharmony_ci// | | |__ | | | | | | version 3.11.2 22c5f01b2fSopenharmony_ci// |_____|_____|_____|_|___| https://github.com/nlohmann/json 23c5f01b2fSopenharmony_ci// 24c5f01b2fSopenharmony_ci// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me> 25c5f01b2fSopenharmony_ci// SPDX-License-Identifier: MIT 26c5f01b2fSopenharmony_ci 27c5f01b2fSopenharmony_ci 28c5f01b2fSopenharmony_ci 29c5f01b2fSopenharmony_ci// This file contains all macro definitions affecting or depending on the ABI 30c5f01b2fSopenharmony_ci 31c5f01b2fSopenharmony_ci#ifndef JSON_SKIP_LIBRARY_VERSION_CHECK 32c5f01b2fSopenharmony_ci #if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PATCH) 33c5f01b2fSopenharmony_ci #if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 11 || NLOHMANN_JSON_VERSION_PATCH != 2 34c5f01b2fSopenharmony_ci #warning "Already included a different version of the library!" 35c5f01b2fSopenharmony_ci #endif 36c5f01b2fSopenharmony_ci #endif 37c5f01b2fSopenharmony_ci#endif 38c5f01b2fSopenharmony_ci 39c5f01b2fSopenharmony_ci#define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum) 40c5f01b2fSopenharmony_ci#define NLOHMANN_JSON_VERSION_MINOR 11 // NOLINT(modernize-macro-to-enum) 41c5f01b2fSopenharmony_ci#define NLOHMANN_JSON_VERSION_PATCH 2 // NOLINT(modernize-macro-to-enum) 42c5f01b2fSopenharmony_ci 43c5f01b2fSopenharmony_ci#ifndef JSON_DIAGNOSTICS 44c5f01b2fSopenharmony_ci #define JSON_DIAGNOSTICS 0 45c5f01b2fSopenharmony_ci#endif 46c5f01b2fSopenharmony_ci 47c5f01b2fSopenharmony_ci#ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 48c5f01b2fSopenharmony_ci #define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0 49c5f01b2fSopenharmony_ci#endif 50c5f01b2fSopenharmony_ci 51c5f01b2fSopenharmony_ci#if JSON_DIAGNOSTICS 52c5f01b2fSopenharmony_ci #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS _diag 53c5f01b2fSopenharmony_ci#else 54c5f01b2fSopenharmony_ci #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS 55c5f01b2fSopenharmony_ci#endif 56c5f01b2fSopenharmony_ci 57c5f01b2fSopenharmony_ci#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 58c5f01b2fSopenharmony_ci #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON _ldvcmp 59c5f01b2fSopenharmony_ci#else 60c5f01b2fSopenharmony_ci #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON 61c5f01b2fSopenharmony_ci#endif 62c5f01b2fSopenharmony_ci 63c5f01b2fSopenharmony_ci#ifndef NLOHMANN_JSON_NAMESPACE_NO_VERSION 64c5f01b2fSopenharmony_ci #define NLOHMANN_JSON_NAMESPACE_NO_VERSION 0 65c5f01b2fSopenharmony_ci#endif 66c5f01b2fSopenharmony_ci 67c5f01b2fSopenharmony_ci// Construct the namespace ABI tags component 68c5f01b2fSopenharmony_ci#define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) json_abi ## a ## b 69c5f01b2fSopenharmony_ci#define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b) \ 70c5f01b2fSopenharmony_ci NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) 71c5f01b2fSopenharmony_ci 72c5f01b2fSopenharmony_ci#define NLOHMANN_JSON_ABI_TAGS \ 73c5f01b2fSopenharmony_ci NLOHMANN_JSON_ABI_TAGS_CONCAT( \ 74c5f01b2fSopenharmony_ci NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \ 75c5f01b2fSopenharmony_ci NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON) 76c5f01b2fSopenharmony_ci 77c5f01b2fSopenharmony_ci// Construct the namespace version component 78c5f01b2fSopenharmony_ci#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \ 79c5f01b2fSopenharmony_ci _v ## major ## _ ## minor ## _ ## patch 80c5f01b2fSopenharmony_ci#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(major, minor, patch) \ 81c5f01b2fSopenharmony_ci NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) 82c5f01b2fSopenharmony_ci 83c5f01b2fSopenharmony_ci#if NLOHMANN_JSON_NAMESPACE_NO_VERSION 84c5f01b2fSopenharmony_ci#define NLOHMANN_JSON_NAMESPACE_VERSION 85c5f01b2fSopenharmony_ci#else 86c5f01b2fSopenharmony_ci#define NLOHMANN_JSON_NAMESPACE_VERSION \ 87c5f01b2fSopenharmony_ci NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(NLOHMANN_JSON_VERSION_MAJOR, \ 88c5f01b2fSopenharmony_ci NLOHMANN_JSON_VERSION_MINOR, \ 89c5f01b2fSopenharmony_ci NLOHMANN_JSON_VERSION_PATCH) 90c5f01b2fSopenharmony_ci#endif 91c5f01b2fSopenharmony_ci 92c5f01b2fSopenharmony_ci// Combine namespace components 93c5f01b2fSopenharmony_ci#define NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) a ## b 94c5f01b2fSopenharmony_ci#define NLOHMANN_JSON_NAMESPACE_CONCAT(a, b) \ 95c5f01b2fSopenharmony_ci NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) 96c5f01b2fSopenharmony_ci 97c5f01b2fSopenharmony_ci#ifndef NLOHMANN_JSON_NAMESPACE 98c5f01b2fSopenharmony_ci#define NLOHMANN_JSON_NAMESPACE \ 99c5f01b2fSopenharmony_ci nlohmann::NLOHMANN_JSON_NAMESPACE_CONCAT( \ 100c5f01b2fSopenharmony_ci NLOHMANN_JSON_ABI_TAGS, \ 101c5f01b2fSopenharmony_ci NLOHMANN_JSON_NAMESPACE_VERSION) 102c5f01b2fSopenharmony_ci#endif 103c5f01b2fSopenharmony_ci 104c5f01b2fSopenharmony_ci#ifndef NLOHMANN_JSON_NAMESPACE_BEGIN 105c5f01b2fSopenharmony_ci#define NLOHMANN_JSON_NAMESPACE_BEGIN \ 106c5f01b2fSopenharmony_ci namespace nlohmann \ 107c5f01b2fSopenharmony_ci { \ 108c5f01b2fSopenharmony_ci inline namespace NLOHMANN_JSON_NAMESPACE_CONCAT( \ 109c5f01b2fSopenharmony_ci NLOHMANN_JSON_ABI_TAGS, \ 110c5f01b2fSopenharmony_ci NLOHMANN_JSON_NAMESPACE_VERSION) \ 111c5f01b2fSopenharmony_ci { 112c5f01b2fSopenharmony_ci#endif 113c5f01b2fSopenharmony_ci 114c5f01b2fSopenharmony_ci#ifndef NLOHMANN_JSON_NAMESPACE_END 115c5f01b2fSopenharmony_ci#define NLOHMANN_JSON_NAMESPACE_END \ 116c5f01b2fSopenharmony_ci } /* namespace (inline namespace) NOLINT(readability/namespace) */ \ 117c5f01b2fSopenharmony_ci } // namespace nlohmann 118c5f01b2fSopenharmony_ci#endif 119c5f01b2fSopenharmony_ci 120c5f01b2fSopenharmony_ci 121c5f01b2fSopenharmony_ci/*! 122c5f01b2fSopenharmony_ci@brief namespace for Niels Lohmann 123c5f01b2fSopenharmony_ci@see https://github.com/nlohmann 124c5f01b2fSopenharmony_ci@since version 1.0.0 125c5f01b2fSopenharmony_ci*/ 126c5f01b2fSopenharmony_ciNLOHMANN_JSON_NAMESPACE_BEGIN 127c5f01b2fSopenharmony_ci 128c5f01b2fSopenharmony_ci/*! 129c5f01b2fSopenharmony_ci@brief default JSONSerializer template argument 130c5f01b2fSopenharmony_ci 131c5f01b2fSopenharmony_ciThis serializer ignores the template arguments and uses ADL 132c5f01b2fSopenharmony_ci([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl)) 133c5f01b2fSopenharmony_cifor serialization. 134c5f01b2fSopenharmony_ci*/ 135c5f01b2fSopenharmony_citemplate<typename T = void, typename SFINAE = void> 136c5f01b2fSopenharmony_cistruct adl_serializer; 137c5f01b2fSopenharmony_ci 138c5f01b2fSopenharmony_ci/// a class to store JSON values 139c5f01b2fSopenharmony_ci/// @sa https://json.nlohmann.me/api/basic_json/ 140c5f01b2fSopenharmony_citemplate<template<typename U, typename V, typename... Args> class ObjectType = 141c5f01b2fSopenharmony_ci std::map, 142c5f01b2fSopenharmony_ci template<typename U, typename... Args> class ArrayType = std::vector, 143c5f01b2fSopenharmony_ci class StringType = std::string, class BooleanType = bool, 144c5f01b2fSopenharmony_ci class NumberIntegerType = std::int64_t, 145c5f01b2fSopenharmony_ci class NumberUnsignedType = std::uint64_t, 146c5f01b2fSopenharmony_ci class NumberFloatType = double, 147c5f01b2fSopenharmony_ci template<typename U> class AllocatorType = std::allocator, 148c5f01b2fSopenharmony_ci template<typename T, typename SFINAE = void> class JSONSerializer = 149c5f01b2fSopenharmony_ci adl_serializer, 150c5f01b2fSopenharmony_ci class BinaryType = std::vector<std::uint8_t>> 151c5f01b2fSopenharmony_ciclass basic_json; 152c5f01b2fSopenharmony_ci 153c5f01b2fSopenharmony_ci/// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document 154c5f01b2fSopenharmony_ci/// @sa https://json.nlohmann.me/api/json_pointer/ 155c5f01b2fSopenharmony_citemplate<typename RefStringType> 156c5f01b2fSopenharmony_ciclass json_pointer; 157c5f01b2fSopenharmony_ci 158c5f01b2fSopenharmony_ci/*! 159c5f01b2fSopenharmony_ci@brief default specialization 160c5f01b2fSopenharmony_ci@sa https://json.nlohmann.me/api/json/ 161c5f01b2fSopenharmony_ci*/ 162c5f01b2fSopenharmony_ciusing json = basic_json<>; 163c5f01b2fSopenharmony_ci 164c5f01b2fSopenharmony_ci/// @brief a minimal map-like container that preserves insertion order 165c5f01b2fSopenharmony_ci/// @sa https://json.nlohmann.me/api/ordered_map/ 166c5f01b2fSopenharmony_citemplate<class Key, class T, class IgnoredLess, class Allocator> 167c5f01b2fSopenharmony_cistruct ordered_map; 168c5f01b2fSopenharmony_ci 169c5f01b2fSopenharmony_ci/// @brief specialization that maintains the insertion order of object keys 170c5f01b2fSopenharmony_ci/// @sa https://json.nlohmann.me/api/ordered_json/ 171c5f01b2fSopenharmony_ciusing ordered_json = basic_json<nlohmann::ordered_map>; 172c5f01b2fSopenharmony_ci 173c5f01b2fSopenharmony_ciNLOHMANN_JSON_NAMESPACE_END 174c5f01b2fSopenharmony_ci 175c5f01b2fSopenharmony_ci#endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_ 176