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