RflySimSDK v4.10
RflySimSDK说明文档
载入中...
搜索中...
未找到
from_json.hpp
1// __ _____ _____ _____
2// __| | __| | | | JSON for Modern C++
3// | | |__ | | | | | | version 3.12.0
4// |_____|_____|_____|_|___| https://github.com/nlohmann/json
5//
6// SPDX-FileCopyrightText: 2013-2025 Niels Lohmann <https://nlohmann.me>
7// SPDX-License-Identifier: MIT
8
9#pragma once
10
11#include <algorithm> // transform
12#include <array> // array
13#include <forward_list> // forward_list
14#include <iterator> // inserter, front_inserter, end
15#include <map> // map
16#include <string> // string
17#include <tuple> // tuple, make_tuple
18#include <type_traits> // is_arithmetic, is_same, is_enum, underlying_type, is_convertible
19#include <unordered_map> // unordered_map
20#include <utility> // pair, declval
21#include <valarray> // valarray
22
23#include <nlohmann/detail/exceptions.hpp>
24#include <nlohmann/detail/macro_scope.hpp>
25#include <nlohmann/detail/meta/cpp_future.hpp>
26#include <nlohmann/detail/meta/identity_tag.hpp>
27#include <nlohmann/detail/meta/std_fs.hpp>
28#include <nlohmann/detail/meta/type_traits.hpp>
29#include <nlohmann/detail/string_concat.hpp>
30#include <nlohmann/detail/value_t.hpp>
31
32// include after macro_scope.hpp
33#ifdef JSON_HAS_CPP_17
34 #include <optional> // optional
35#endif
36
37#if JSON_HAS_FILESYSTEM || JSON_HAS_EXPERIMENTAL_FILESYSTEM
38 #include <string_view> // u8string_view
39#endif
40
41NLOHMANN_JSON_NAMESPACE_BEGIN
42namespace detail
43{
44
45template<typename BasicJsonType>
46inline void from_json(const BasicJsonType& j, typename std::nullptr_t& n)
47{
48 if (JSON_HEDLEY_UNLIKELY(!j.is_null()))
49 {
50 JSON_THROW(type_error::create(302, concat("type must be null, but is ", j.type_name()), &j));
51 }
52 n = nullptr;
53}
54
55#ifdef JSON_HAS_CPP_17
56template<typename BasicJsonType, typename T>
57void from_json(const BasicJsonType& j, std::optional<T>& opt)
58{
59 if (j.is_null())
60 {
61 opt = std::nullopt;
62 }
63 else
64 {
65 opt.emplace(j.template get<T>());
66 }
67}
68#endif // JSON_HAS_CPP_17
69
70// overloads for basic_json template parameters
71template < typename BasicJsonType, typename ArithmeticType,
72 enable_if_t < std::is_arithmetic<ArithmeticType>::value&&
73 !std::is_same<ArithmeticType, typename BasicJsonType::boolean_t>::value,
74 int > = 0 >
75void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val)
76{
77 switch (static_cast<value_t>(j))
78 {
80 {
81 val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
82 break;
83 }
85 {
86 val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
87 break;
88 }
90 {
91 val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
92 break;
93 }
94
95 case value_t::null:
96 case value_t::object:
97 case value_t::array:
98 case value_t::string:
100 case value_t::binary:
102 default:
103 JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
104 }
105}
106
107template<typename BasicJsonType>
108inline void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b)
109{
110 if (JSON_HEDLEY_UNLIKELY(!j.is_boolean()))
111 {
112 JSON_THROW(type_error::create(302, concat("type must be boolean, but is ", j.type_name()), &j));
113 }
114 b = *j.template get_ptr<const typename BasicJsonType::boolean_t*>();
115}
116
117template<typename BasicJsonType>
118inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s)
119{
120 if (JSON_HEDLEY_UNLIKELY(!j.is_string()))
121 {
122 JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j));
123 }
124 s = *j.template get_ptr<const typename BasicJsonType::string_t*>();
125}
126
127template <
128 typename BasicJsonType, typename StringType,
129 enable_if_t <
130 std::is_assignable<StringType&, const typename BasicJsonType::string_t>::value
131 && is_detected_exact<typename BasicJsonType::string_t::value_type, value_type_t, StringType>::value
132 && !std::is_same<typename BasicJsonType::string_t, StringType>::value
133 && !is_json_ref<StringType>::value, int > = 0 >
134inline void from_json(const BasicJsonType& j, StringType& s)
135{
136 if (JSON_HEDLEY_UNLIKELY(!j.is_string()))
137 {
138 JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j));
139 }
140
141 s = *j.template get_ptr<const typename BasicJsonType::string_t*>();
142}
143
144template<typename BasicJsonType>
145inline void from_json(const BasicJsonType& j, typename BasicJsonType::number_float_t& val)
146{
147 get_arithmetic_value(j, val);
148}
149
150template<typename BasicJsonType>
151inline void from_json(const BasicJsonType& j, typename BasicJsonType::number_unsigned_t& val)
152{
153 get_arithmetic_value(j, val);
154}
155
156template<typename BasicJsonType>
157inline void from_json(const BasicJsonType& j, typename BasicJsonType::number_integer_t& val)
158{
159 get_arithmetic_value(j, val);
160}
161
162#if !JSON_DISABLE_ENUM_SERIALIZATION
163template<typename BasicJsonType, typename EnumType,
164 enable_if_t<std::is_enum<EnumType>::value, int> = 0>
165inline void from_json(const BasicJsonType& j, EnumType& e)
166{
167 typename std::underlying_type<EnumType>::type val;
168 get_arithmetic_value(j, val);
169 e = static_cast<EnumType>(val);
170}
171#endif // JSON_DISABLE_ENUM_SERIALIZATION
172
173// forward_list doesn't have an insert method
174template<typename BasicJsonType, typename T, typename Allocator,
175 enable_if_t<is_getable<BasicJsonType, T>::value, int> = 0>
176inline void from_json(const BasicJsonType& j, std::forward_list<T, Allocator>& l)
177{
178 if (JSON_HEDLEY_UNLIKELY(!j.is_array()))
179 {
180 JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j));
181 }
182 l.clear();
183 std::transform(j.rbegin(), j.rend(),
184 std::front_inserter(l), [](const BasicJsonType & i)
185 {
186 return i.template get<T>();
187 });
188}
189
190// valarray doesn't have an insert method
191template<typename BasicJsonType, typename T,
192 enable_if_t<is_getable<BasicJsonType, T>::value, int> = 0>
193inline void from_json(const BasicJsonType& j, std::valarray<T>& l)
194{
195 if (JSON_HEDLEY_UNLIKELY(!j.is_array()))
196 {
197 JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j));
198 }
199 l.resize(j.size());
200 std::transform(j.begin(), j.end(), std::begin(l),
201 [](const BasicJsonType & elem)
202 {
203 return elem.template get<T>();
204 });
205}
206
207template<typename BasicJsonType, typename T, std::size_t N>
208auto from_json(const BasicJsonType& j, T (&arr)[N]) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)
209-> decltype(j.template get<T>(), void())
210{
211 for (std::size_t i = 0; i < N; ++i)
212 {
213 arr[i] = j.at(i).template get<T>();
214 }
215}
216
217template<typename BasicJsonType, typename T, std::size_t N1, std::size_t N2>
218auto from_json(const BasicJsonType& j, T (&arr)[N1][N2]) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)
219-> decltype(j.template get<T>(), void())
220{
221 for (std::size_t i1 = 0; i1 < N1; ++i1)
222 {
223 for (std::size_t i2 = 0; i2 < N2; ++i2)
224 {
225 arr[i1][i2] = j.at(i1).at(i2).template get<T>();
226 }
227 }
228}
229
230template<typename BasicJsonType, typename T, std::size_t N1, std::size_t N2, std::size_t N3>
231auto from_json(const BasicJsonType& j, T (&arr)[N1][N2][N3]) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)
232-> decltype(j.template get<T>(), void())
233{
234 for (std::size_t i1 = 0; i1 < N1; ++i1)
235 {
236 for (std::size_t i2 = 0; i2 < N2; ++i2)
237 {
238 for (std::size_t i3 = 0; i3 < N3; ++i3)
239 {
240 arr[i1][i2][i3] = j.at(i1).at(i2).at(i3).template get<T>();
241 }
242 }
243 }
244}
245
246template<typename BasicJsonType, typename T, std::size_t N1, std::size_t N2, std::size_t N3, std::size_t N4>
247auto from_json(const BasicJsonType& j, T (&arr)[N1][N2][N3][N4]) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)
248-> decltype(j.template get<T>(), void())
249{
250 for (std::size_t i1 = 0; i1 < N1; ++i1)
251 {
252 for (std::size_t i2 = 0; i2 < N2; ++i2)
253 {
254 for (std::size_t i3 = 0; i3 < N3; ++i3)
255 {
256 for (std::size_t i4 = 0; i4 < N4; ++i4)
257 {
258 arr[i1][i2][i3][i4] = j.at(i1).at(i2).at(i3).at(i4).template get<T>();
259 }
260 }
261 }
262 }
263}
264
265template<typename BasicJsonType>
266inline void from_json_array_impl(const BasicJsonType& j, typename BasicJsonType::array_t& arr, priority_tag<3> /*unused*/)
267{
268 arr = *j.template get_ptr<const typename BasicJsonType::array_t*>();
269}
270
271template<typename BasicJsonType, typename T, std::size_t N>
272auto from_json_array_impl(const BasicJsonType& j, std::array<T, N>& arr,
273 priority_tag<2> /*unused*/)
274-> decltype(j.template get<T>(), void())
275{
276 for (std::size_t i = 0; i < N; ++i)
277 {
278 arr[i] = j.at(i).template get<T>();
279 }
280}
281
282template<typename BasicJsonType, typename ConstructibleArrayType,
283 enable_if_t<
284 std::is_assignable<ConstructibleArrayType&, ConstructibleArrayType>::value,
285 int> = 0>
286auto from_json_array_impl(const BasicJsonType& j, ConstructibleArrayType& arr, priority_tag<1> /*unused*/)
287-> decltype(
288 arr.reserve(std::declval<typename ConstructibleArrayType::size_type>()),
289 j.template get<typename ConstructibleArrayType::value_type>(),
290 void())
291{
292 using std::end;
293
294 ConstructibleArrayType ret;
295 ret.reserve(j.size());
296 std::transform(j.begin(), j.end(),
297 std::inserter(ret, end(ret)), [](const BasicJsonType & i)
298 {
299 // get<BasicJsonType>() returns *this, this won't call a from_json
300 // method when value_type is BasicJsonType
301 return i.template get<typename ConstructibleArrayType::value_type>();
302 });
303 arr = std::move(ret);
304}
305
306template<typename BasicJsonType, typename ConstructibleArrayType,
307 enable_if_t<
308 std::is_assignable<ConstructibleArrayType&, ConstructibleArrayType>::value,
309 int> = 0>
310inline void from_json_array_impl(const BasicJsonType& j, ConstructibleArrayType& arr,
311 priority_tag<0> /*unused*/)
312{
313 using std::end;
314
315 ConstructibleArrayType ret;
316 std::transform(
317 j.begin(), j.end(), std::inserter(ret, end(ret)),
318 [](const BasicJsonType & i)
319 {
320 // get<BasicJsonType>() returns *this, this won't call a from_json
321 // method when value_type is BasicJsonType
322 return i.template get<typename ConstructibleArrayType::value_type>();
323 });
324 arr = std::move(ret);
325}
326
327template < typename BasicJsonType, typename ConstructibleArrayType,
328 enable_if_t <
331 !is_constructible_string_type<BasicJsonType, ConstructibleArrayType>::value&&
332 !std::is_same<ConstructibleArrayType, typename BasicJsonType::binary_t>::value&&
334 int > = 0 >
335auto from_json(const BasicJsonType& j, ConstructibleArrayType& arr)
336-> decltype(from_json_array_impl(j, arr, priority_tag<3> {}),
337j.template get<typename ConstructibleArrayType::value_type>(),
338void())
339{
340 if (JSON_HEDLEY_UNLIKELY(!j.is_array()))
341 {
342 JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j));
343 }
344
345 from_json_array_impl(j, arr, priority_tag<3> {});
346}
347
348template < typename BasicJsonType, typename T, std::size_t... Idx >
349std::array<T, sizeof...(Idx)> from_json_inplace_array_impl(BasicJsonType&& j,
350 identity_tag<std::array<T, sizeof...(Idx)>> /*unused*/, index_sequence<Idx...> /*unused*/)
351{
352 return { { std::forward<BasicJsonType>(j).at(Idx).template get<T>()... } };
353}
354
355template < typename BasicJsonType, typename T, std::size_t N >
356auto from_json(BasicJsonType&& j, identity_tag<std::array<T, N>> tag)
357-> decltype(from_json_inplace_array_impl(std::forward<BasicJsonType>(j), tag, make_index_sequence<N> {}))
358{
359 if (JSON_HEDLEY_UNLIKELY(!j.is_array()))
360 {
361 JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j));
362 }
363
364 return from_json_inplace_array_impl(std::forward<BasicJsonType>(j), tag, make_index_sequence<N> {});
365}
366
367template<typename BasicJsonType>
368inline void from_json(const BasicJsonType& j, typename BasicJsonType::binary_t& bin)
369{
370 if (JSON_HEDLEY_UNLIKELY(!j.is_binary()))
371 {
372 JSON_THROW(type_error::create(302, concat("type must be binary, but is ", j.type_name()), &j));
373 }
374
375 bin = *j.template get_ptr<const typename BasicJsonType::binary_t*>();
376}
377
378template<typename BasicJsonType, typename ConstructibleObjectType,
379 enable_if_t<is_constructible_object_type<BasicJsonType, ConstructibleObjectType>::value, int> = 0>
380inline void from_json(const BasicJsonType& j, ConstructibleObjectType& obj)
381{
382 if (JSON_HEDLEY_UNLIKELY(!j.is_object()))
383 {
384 JSON_THROW(type_error::create(302, concat("type must be object, but is ", j.type_name()), &j));
385 }
386
387 ConstructibleObjectType ret;
388 const auto* inner_object = j.template get_ptr<const typename BasicJsonType::object_t*>();
389 using value_type = typename ConstructibleObjectType::value_type;
390 std::transform(
391 inner_object->begin(), inner_object->end(),
392 std::inserter(ret, ret.begin()),
393 [](typename BasicJsonType::object_t::value_type const & p)
394 {
395 return value_type(p.first, p.second.template get<typename ConstructibleObjectType::mapped_type>());
396 });
397 obj = std::move(ret);
398}
399
400// overload for arithmetic types, not chosen for basic_json template arguments
401// (BooleanType, etc.); note: Is it really necessary to provide explicit
402// overloads for boolean_t etc. in case of a custom BooleanType which is not
403// an arithmetic type?
404template < typename BasicJsonType, typename ArithmeticType,
405 enable_if_t <
406 std::is_arithmetic<ArithmeticType>::value&&
407 !std::is_same<ArithmeticType, typename BasicJsonType::number_unsigned_t>::value&&
408 !std::is_same<ArithmeticType, typename BasicJsonType::number_integer_t>::value&&
409 !std::is_same<ArithmeticType, typename BasicJsonType::number_float_t>::value&&
410 !std::is_same<ArithmeticType, typename BasicJsonType::boolean_t>::value,
411 int > = 0 >
412inline void from_json(const BasicJsonType& j, ArithmeticType& val)
413{
414 switch (static_cast<value_t>(j))
415 {
417 {
418 val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
419 break;
420 }
422 {
423 val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
424 break;
425 }
427 {
428 val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
429 break;
430 }
431 case value_t::boolean:
432 {
433 val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>());
434 break;
435 }
436
437 case value_t::null:
438 case value_t::object:
439 case value_t::array:
440 case value_t::string:
441 case value_t::binary:
443 default:
444 JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
445 }
446}
447
448template<typename BasicJsonType, typename... Args, std::size_t... Idx>
449std::tuple<Args...> from_json_tuple_impl_base(BasicJsonType&& j, index_sequence<Idx...> /*unused*/)
450{
451 return std::make_tuple(std::forward<BasicJsonType>(j).at(Idx).template get<Args>()...);
452}
453
454template<typename BasicJsonType>
455std::tuple<> from_json_tuple_impl_base(BasicJsonType& /*unused*/, index_sequence<> /*unused*/)
456{
457 return {};
458}
459
460template < typename BasicJsonType, class A1, class A2 >
461std::pair<A1, A2> from_json_tuple_impl(BasicJsonType&& j, identity_tag<std::pair<A1, A2>> /*unused*/, priority_tag<0> /*unused*/)
462{
463 return {std::forward<BasicJsonType>(j).at(0).template get<A1>(),
464 std::forward<BasicJsonType>(j).at(1).template get<A2>()};
465}
466
467template<typename BasicJsonType, typename A1, typename A2>
468inline void from_json_tuple_impl(BasicJsonType&& j, std::pair<A1, A2>& p, priority_tag<1> /*unused*/)
469{
470 p = from_json_tuple_impl(std::forward<BasicJsonType>(j), identity_tag<std::pair<A1, A2>> {}, priority_tag<0> {});
471}
472
473template<typename BasicJsonType, typename... Args>
474std::tuple<Args...> from_json_tuple_impl(BasicJsonType&& j, identity_tag<std::tuple<Args...>> /*unused*/, priority_tag<2> /*unused*/)
475{
476 return from_json_tuple_impl_base<BasicJsonType, Args...>(std::forward<BasicJsonType>(j), index_sequence_for<Args...> {});
477}
478
479template<typename BasicJsonType, typename... Args>
480inline void from_json_tuple_impl(BasicJsonType&& j, std::tuple<Args...>& t, priority_tag<3> /*unused*/)
481{
482 t = from_json_tuple_impl_base<BasicJsonType, Args...>(std::forward<BasicJsonType>(j), index_sequence_for<Args...> {});
483}
484
485template<typename BasicJsonType, typename TupleRelated>
486auto from_json(BasicJsonType&& j, TupleRelated&& t)
487-> decltype(from_json_tuple_impl(std::forward<BasicJsonType>(j), std::forward<TupleRelated>(t), priority_tag<3> {}))
488{
489 if (JSON_HEDLEY_UNLIKELY(!j.is_array()))
490 {
491 JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j));
492 }
493
494 return from_json_tuple_impl(std::forward<BasicJsonType>(j), std::forward<TupleRelated>(t), priority_tag<3> {});
495}
496
497template < typename BasicJsonType, typename Key, typename Value, typename Compare, typename Allocator,
498 typename = enable_if_t < !std::is_constructible <
499 typename BasicJsonType::string_t, Key >::value >>
500inline void from_json(const BasicJsonType& j, std::map<Key, Value, Compare, Allocator>& m)
501{
502 if (JSON_HEDLEY_UNLIKELY(!j.is_array()))
503 {
504 JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j));
505 }
506 m.clear();
507 for (const auto& p : j)
508 {
509 if (JSON_HEDLEY_UNLIKELY(!p.is_array()))
510 {
511 JSON_THROW(type_error::create(302, concat("type must be array, but is ", p.type_name()), &j));
512 }
513 m.emplace(p.at(0).template get<Key>(), p.at(1).template get<Value>());
514 }
515}
516
517template < typename BasicJsonType, typename Key, typename Value, typename Hash, typename KeyEqual, typename Allocator,
518 typename = enable_if_t < !std::is_constructible <
519 typename BasicJsonType::string_t, Key >::value >>
520inline void from_json(const BasicJsonType& j, std::unordered_map<Key, Value, Hash, KeyEqual, Allocator>& m)
521{
522 if (JSON_HEDLEY_UNLIKELY(!j.is_array()))
523 {
524 JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j));
525 }
526 m.clear();
527 for (const auto& p : j)
528 {
529 if (JSON_HEDLEY_UNLIKELY(!p.is_array()))
530 {
531 JSON_THROW(type_error::create(302, concat("type must be array, but is ", p.type_name()), &j));
532 }
533 m.emplace(p.at(0).template get<Key>(), p.at(1).template get<Value>());
534 }
535}
536
537#if JSON_HAS_FILESYSTEM || JSON_HAS_EXPERIMENTAL_FILESYSTEM
538template<typename BasicJsonType>
539inline void from_json(const BasicJsonType& j, std_fs::path& p)
540{
541 if (JSON_HEDLEY_UNLIKELY(!j.is_string()))
542 {
543 JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j));
544 }
545 const auto& s = *j.template get_ptr<const typename BasicJsonType::string_t*>();
546 // Checking for C++20 standard or later can be insufficient in case the
547 // library support for char8_t is either incomplete or was disabled
548 // altogether. Use the __cpp_lib_char8_t feature test instead.
549#if defined(__cpp_lib_char8_t) && (__cpp_lib_char8_t >= 201907L)
550 p = std_fs::path(std::u8string_view(reinterpret_cast<const char8_t*>(s.data()), s.size()));
551#else
552 p = std_fs::u8path(s); // accepts UTF-8 encoded std::string in C++17, deprecated in C++20
553#endif
554}
555#endif
556
558{
559 template<typename BasicJsonType, typename T>
560 auto operator()(const BasicJsonType& j, T&& val) const
561 noexcept(noexcept(from_json(j, std::forward<T>(val))))
562 -> decltype(from_json(j, std::forward<T>(val)))
563 {
564 return from_json(j, std::forward<T>(val));
565 }
566};
567
568} // namespace detail
569
570#ifndef JSON_HAS_CPP_17
571/// namespace to hold default `from_json` function
572/// to see why this is required:
573/// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4381.html
574namespace // NOLINT(cert-dcl59-cpp,fuchsia-header-anon-namespaces,google-build-namespaces)
575{
576#endif
577JSON_INLINE_VARIABLE constexpr const auto& from_json = // NOLINT(misc-definitions-in-headers)
578 detail::static_const<detail::from_json_fn>::value;
579#ifndef JSON_HAS_CPP_17
580} // namespace
581#endif
582
583NLOHMANN_JSON_NAMESPACE_END
detail namespace with internal helper functions
定义 from_json.hpp:43
value_t
the JSON type enumeration
定义 value_t.hpp:54
@ null
null value
定义 value_t.hpp:55
@ number_integer
number value (signed integer)
定义 value_t.hpp:60
@ boolean
boolean value
定义 value_t.hpp:59
@ discarded
discarded by the parser callback function
定义 value_t.hpp:64
@ binary
binary array (ordered collection of bytes)
定义 value_t.hpp:63
@ object
object (unordered set of name/value pairs)
定义 value_t.hpp:56
@ string
string value
定义 value_t.hpp:58
@ number_float
number value (floating-point)
定义 value_t.hpp:62
@ number_unsigned
number value (unsigned integer)
定义 value_t.hpp:61
@ array
array (ordered collection of values)
定义 value_t.hpp:57
定义 from_json.hpp:558
定义 identity_tag.hpp:18
定义 type_traits.hpp:52
定义 type_traits.hpp:517
定义 type_traits.hpp:427
定义 type_traits.hpp:75
定义 cpp_future.hpp:149