json_fwd.hpp 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // __ _____ _____ _____
  2. // __| | __| | | | JSON for Modern C++
  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. #ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_
  9. #define INCLUDE_NLOHMANN_JSON_FWD_HPP_
  10. #include <cstdint> // int64_t, uint64_t
  11. #include <map> // map
  12. #include <memory> // allocator
  13. #include <string> // string
  14. #include <vector> // vector
  15. #include <nlohmann/detail/abi_macros.hpp>
  16. /*!
  17. @brief namespace for Niels Lohmann
  18. @see https://github.com/nlohmann
  19. @since version 1.0.0
  20. */
  21. NLOHMANN_JSON_NAMESPACE_BEGIN
  22. /*!
  23. @brief default JSONSerializer template argument
  24. This serializer ignores the template arguments and uses ADL
  25. ([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl))
  26. for serialization.
  27. */
  28. template<typename T = void, typename SFINAE = void>
  29. struct adl_serializer;
  30. /// a class to store JSON values
  31. /// @sa https://json.nlohmann.me/api/basic_json/
  32. template<template<typename U, typename V, typename... Args> class ObjectType =
  33. std::map,
  34. template<typename U, typename... Args> class ArrayType = std::vector,
  35. class StringType = std::string, class BooleanType = bool,
  36. class NumberIntegerType = std::int64_t,
  37. class NumberUnsignedType = std::uint64_t,
  38. class NumberFloatType = double,
  39. template<typename U> class AllocatorType = std::allocator,
  40. template<typename T, typename SFINAE = void> class JSONSerializer =
  41. adl_serializer,
  42. class BinaryType = std::vector<std::uint8_t>, // cppcheck-suppress syntaxError
  43. class CustomBaseClass = void>
  44. class basic_json;
  45. /// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document
  46. /// @sa https://json.nlohmann.me/api/json_pointer/
  47. template<typename RefStringType>
  48. class json_pointer;
  49. /*!
  50. @brief default specialization
  51. @sa https://json.nlohmann.me/api/json/
  52. */
  53. using json = basic_json<>;
  54. /// @brief a minimal map-like container that preserves insertion order
  55. /// @sa https://json.nlohmann.me/api/ordered_map/
  56. template<class Key, class T, class IgnoredLess, class Allocator>
  57. struct ordered_map;
  58. /// @brief specialization that maintains the insertion order of object keys
  59. /// @sa https://json.nlohmann.me/api/ordered_json/
  60. using ordered_json = basic_json<nlohmann::ordered_map>;
  61. NLOHMANN_JSON_NAMESPACE_END
  62. #endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_