json_fwd.hpp 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_
  2. #define INCLUDE_NLOHMANN_JSON_FWD_HPP_
  3. #include <cstdint> // int64_t, uint64_t
  4. #include <map> // map
  5. #include <memory> // allocator
  6. #include <string> // string
  7. #include <vector> // vector
  8. /*!
  9. @brief namespace for Niels Lohmann
  10. @see https://github.com/nlohmann
  11. @since version 1.0.0
  12. */
  13. namespace nlohmann
  14. {
  15. /*!
  16. @brief default JSONSerializer template argument
  17. This serializer ignores the template arguments and uses ADL
  18. ([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl))
  19. for serialization.
  20. */
  21. template<typename T = void, typename SFINAE = void>
  22. struct adl_serializer;
  23. template<template<typename U, typename V, typename... Args> class ObjectType =
  24. std::map,
  25. template<typename U, typename... Args> class ArrayType = std::vector,
  26. class StringType = std::string, class BooleanType = bool,
  27. class NumberIntegerType = std::int64_t,
  28. class NumberUnsignedType = std::uint64_t,
  29. class NumberFloatType = double,
  30. template<typename U> class AllocatorType = std::allocator,
  31. template<typename T, typename SFINAE = void> class JSONSerializer =
  32. adl_serializer,
  33. class BinaryType = std::vector<std::uint8_t>>
  34. class basic_json;
  35. /*!
  36. @brief JSON Pointer
  37. A JSON pointer defines a string syntax for identifying a specific value
  38. within a JSON document. It can be used with functions `at` and
  39. `operator[]`. Furthermore, JSON pointers are the base for JSON patches.
  40. @sa [RFC 6901](https://tools.ietf.org/html/rfc6901)
  41. @since version 2.0.0
  42. */
  43. template<typename BasicJsonType>
  44. class json_pointer;
  45. /*!
  46. @brief default JSON class
  47. This type is the default specialization of the @ref basic_json class which
  48. uses the standard template types.
  49. @since version 1.0.0
  50. */
  51. using json = basic_json<>;
  52. template<class Key, class T, class IgnoredLess, class Allocator>
  53. struct ordered_map;
  54. /*!
  55. @brief ordered JSON class
  56. This type preserves the insertion order of object keys.
  57. @since version 3.9.0
  58. */
  59. using ordered_json = basic_json<nlohmann::ordered_map>;
  60. } // namespace nlohmann
  61. #endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_