json_fwd.hpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef NLOHMANN_JSON_FWD_HPP
  2. #define 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 basic_json;
  34. /*!
  35. @brief JSON Pointer
  36. A JSON pointer defines a string syntax for identifying a specific value
  37. within a JSON document. It can be used with functions `at` and
  38. `operator[]`. Furthermore, JSON pointers are the base for JSON patches.
  39. @sa [RFC 6901](https://tools.ietf.org/html/rfc6901)
  40. @since version 2.0.0
  41. */
  42. template<typename BasicJsonType>
  43. class json_pointer;
  44. /*!
  45. @brief default JSON class
  46. This type is the default specialization of the @ref basic_json class which
  47. uses the standard template types.
  48. @since version 1.0.0
  49. */
  50. using json = basic_json<>;
  51. }
  52. #endif