json_fwd.hpp 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // __ _____ _____ _____
  2. // __| | __| | | | JSON for Modern C++
  3. // | | |__ | | | | | | version 3.11.2
  4. // |_____|_____|_____|_|___| https://github.com/nlohmann/json
  5. //
  6. // SPDX-FileCopyrightText: 2013-2022 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>>
  43. class basic_json;
  44. /// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document
  45. /// @sa https://json.nlohmann.me/api/json_pointer/
  46. template<typename RefStringType>
  47. class json_pointer;
  48. /*!
  49. @brief default specialization
  50. @sa https://json.nlohmann.me/api/json/
  51. */
  52. using json = basic_json<>;
  53. /// @brief a minimal map-like container that preserves insertion order
  54. /// @sa https://json.nlohmann.me/api/ordered_map/
  55. template<class Key, class T, class IgnoredLess, class Allocator>
  56. struct ordered_map;
  57. /// @brief specialization that maintains the insertion order of object keys
  58. /// @sa https://json.nlohmann.me/api/ordered_json/
  59. using ordered_json = basic_json<nlohmann::ordered_map>;
  60. NLOHMANN_JSON_NAMESPACE_END
  61. #endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_