Lines Matching defs:detail
48 // #include <nlohmann/detail/abi_macros.hpp>
150 // #include <nlohmann/detail/conversions/from_json.hpp>
173 // #include <nlohmann/detail/exceptions.hpp>
190 // #include <nlohmann/detail/value_t.hpp>
206 // #include <nlohmann/detail/macro_scope.hpp>
218 // #include <nlohmann/detail/meta/detected.hpp>
231 // #include <nlohmann/detail/meta/void_t.hpp>
242 // #include <nlohmann/detail/abi_macros.hpp>
246 namespace detail
255 } // namespace detail
260 namespace detail
313 } // namespace detail
2367 // #include <nlohmann/detail/abi_macros.hpp>
2771 namespace detail { \
2792 static constexpr auto const value = ::nlohmann::detail:: \
2825 namespace detail
2920 } // namespace detail
2923 // #include <nlohmann/detail/string_escape.hpp>
2934 // #include <nlohmann/detail/abi_macros.hpp>
2938 namespace detail
2995 } // namespace detail
2998 // #include <nlohmann/detail/input/position_t.hpp>
3011 // #include <nlohmann/detail/abi_macros.hpp>
3015 namespace detail
3035 } // namespace detail
3038 // #include <nlohmann/detail/macro_scope.hpp>
3040 // #include <nlohmann/detail/meta/cpp_future.hpp>
3057 // #include <nlohmann/detail/macro_scope.hpp>
3061 namespace detail
3211 } // namespace detail
3214 // #include <nlohmann/detail/meta/type_traits.hpp>
3230 // #include <nlohmann/detail/iterators/iterator_traits.hpp>
3243 // #include <nlohmann/detail/abi_macros.hpp>
3245 // #include <nlohmann/detail/meta/void_t.hpp>
3247 // #include <nlohmann/detail/meta/cpp_future.hpp>
3251 namespace detail
3293 } // namespace detail
3296 // #include <nlohmann/detail/macro_scope.hpp>
3298 // #include <nlohmann/detail/meta/call_std/begin.hpp>
3309 // #include <nlohmann/detail/macro_scope.hpp>
3318 // #include <nlohmann/detail/meta/call_std/end.hpp>
3329 // #include <nlohmann/detail/macro_scope.hpp>
3338 // #include <nlohmann/detail/meta/cpp_future.hpp>
3340 // #include <nlohmann/detail/meta/detected.hpp>
3360 // #include <nlohmann/detail/abi_macros.hpp>
3422 @brief detail namespace with internal helper functions
3429 namespace detail
4056 typename = detail::enable_if_t<all_integral<OfType, T>::value>>
4135 } // namespace detail
4138 // #include <nlohmann/detail/string_concat.hpp>
4153 // #include <nlohmann/detail/meta/cpp_future.hpp>
4155 // #include <nlohmann/detail/meta/detected.hpp>
4159 namespace detail
4285 } // namespace detail
4291 namespace detail
4382 return concat(a, '/', detail::escape(b));
4518 } // namespace detail
4521 // #include <nlohmann/detail/macro_scope.hpp>
4523 // #include <nlohmann/detail/meta/cpp_future.hpp>
4525 // #include <nlohmann/detail/meta/identity_tag.hpp>
4536 // #include <nlohmann/detail/abi_macros.hpp>
4540 namespace detail
4546 } // namespace detail
4549 // #include <nlohmann/detail/meta/std_fs.hpp>
4560 // #include <nlohmann/detail/macro_scope.hpp>
4566 namespace detail
4569 } // namespace detail
4574 namespace detail
4577 } // namespace detail
4581 // #include <nlohmann/detail/meta/type_traits.hpp>
4583 // #include <nlohmann/detail/string_concat.hpp>
4585 // #include <nlohmann/detail/value_t.hpp>
4589 namespace detail
5038 } // namespace detail
5048 detail::static_const<detail::from_json_fn>::value;
5055 // #include <nlohmann/detail/conversions/to_json.hpp>
5075 // #include <nlohmann/detail/iterators/iteration_proxy.hpp>
5096 // #include <nlohmann/detail/abi_macros.hpp>
5098 // #include <nlohmann/detail/meta/type_traits.hpp>
5100 // #include <nlohmann/detail/value_t.hpp>
5104 namespace detail
5271 auto get(const nlohmann::detail::iteration_proxy_value<IteratorType>& i) -> decltype(i.key())
5279 auto get(const nlohmann::detail::iteration_proxy_value<IteratorType>& i) -> decltype(i.value())
5284 } // namespace detail
5300 class tuple_size<::nlohmann::detail::iteration_proxy_value<IteratorType>>
5304 class tuple_element<N, ::nlohmann::detail::iteration_proxy_value<IteratorType >>
5309 ::nlohmann::detail::iteration_proxy_value<IteratorType >> ()));
5319 inline constexpr bool ::std::ranges::enable_borrowed_range<::nlohmann::detail::iteration_proxy<IteratorType>> = true;
5322 // #include <nlohmann/detail/macro_scope.hpp>
5324 // #include <nlohmann/detail/meta/cpp_future.hpp>
5326 // #include <nlohmann/detail/meta/std_fs.hpp>
5328 // #include <nlohmann/detail/meta/type_traits.hpp>
5330 // #include <nlohmann/detail/value_t.hpp>
5334 namespace detail
5581 && !std::is_same <detail::uncvref_t<std::vector<bool>::const_reference>,
5737 } // namespace detail
5747 detail::static_const<detail::to_json_fn>::value;
5754 // #include <nlohmann/detail/meta/identity_tag.hpp>
5777 noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {})))
5778 -> decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {}))
5780 return ::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {});
5811 // #include <nlohmann/detail/abi_macros.hpp>
5902 // #include <nlohmann/detail/conversions/from_json.hpp>
5904 // #include <nlohmann/detail/conversions/to_json.hpp>
5906 // #include <nlohmann/detail/exceptions.hpp>
5908 // #include <nlohmann/detail/hash.hpp>
5923 // #include <nlohmann/detail/abi_macros.hpp>
5925 // #include <nlohmann/detail/value_t.hpp>
5929 namespace detail
6038 } // namespace detail
6041 // #include <nlohmann/detail/input/binary_reader.hpp>
6065 // #include <nlohmann/detail/exceptions.hpp>
6067 // #include <nlohmann/detail/input/input_adapters.hpp>
6093 // #include <nlohmann/detail/iterators/iterator_traits.hpp>
6095 // #include <nlohmann/detail/macro_scope.hpp>
6099 namespace detail
6562 } // namespace detail
6565 // #include <nlohmann/detail/input/json_sax.hpp>
6581 // #include <nlohmann/detail/exceptions.hpp>
6583 // #include <nlohmann/detail/macro_scope.hpp>
6585 // #include <nlohmann/detail/string_concat.hpp>
6703 const detail::exception& ex) = 0;
6714 namespace detail
7289 bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, const detail::exception& /*unused*/)
7295 } // namespace detail
7298 // #include <nlohmann/detail/input/lexer.hpp>
7319 // #include <nlohmann/detail/input/input_adapters.hpp>
7321 // #include <nlohmann/detail/input/position_t.hpp>
7323 // #include <nlohmann/detail/macro_scope.hpp>
7327 namespace detail
8932 } // namespace detail
8935 // #include <nlohmann/detail/macro_scope.hpp>
8937 // #include <nlohmann/detail/meta/is_sax.hpp>
8952 // #include <nlohmann/detail/abi_macros.hpp>
8954 // #include <nlohmann/detail/meta/detected.hpp>
8956 // #include <nlohmann/detail/meta/type_traits.hpp>
8960 namespace detail
9098 } // namespace detail
9101 // #include <nlohmann/detail/meta/type_traits.hpp>
9103 // #include <nlohmann/detail/string_concat.hpp>
9105 // #include <nlohmann/detail/value_t.hpp>
9109 namespace detail
9160 (void)detail::is_sax_static_asserts<SAX, BasicJsonType> {};
9859 b.set_subtype(detail::conditional_static_cast<typename binary_t::subtype_type>(subtype));
9866 b.set_subtype(detail::conditional_static_cast<typename binary_t::subtype_type>(subtype));
9873 b.set_subtype(detail::conditional_static_cast<typename binary_t::subtype_type>(subtype));
9880 b.set_subtype(detail::conditional_static_cast<typename binary_t::subtype_type>(subtype));
11218 result = detail::conditional_static_cast<std::size_t>(number);
11771 using ia_type = decltype(detail::input_adapter(number_vector));
11772 auto number_lexer = detail::lexer<BasicJsonType, ia_type>(detail::input_adapter(number_vector), false);
11777 using token_type = typename detail::lexer_base<BasicJsonType>::token_type;
11984 @param[in] detail a detailed error message
11989 const std::string& detail,
12021 return concat(error_msg, ' ', context, ": ", detail);
12083 } // namespace detail
12086 // #include <nlohmann/detail/input/input_adapters.hpp>
12088 // #include <nlohmann/detail/input/lexer.hpp>
12090 // #include <nlohmann/detail/input/parser.hpp>
12108 // #include <nlohmann/detail/exceptions.hpp>
12110 // #include <nlohmann/detail/input/input_adapters.hpp>
12112 // #include <nlohmann/detail/input/json_sax.hpp>
12114 // #include <nlohmann/detail/input/lexer.hpp>
12116 // #include <nlohmann/detail/macro_scope.hpp>
12118 // #include <nlohmann/detail/meta/is_sax.hpp>
12120 // #include <nlohmann/detail/string_concat.hpp>
12122 // #include <nlohmann/detail/value_t.hpp>
12126 namespace detail
12261 (void)detail::is_sax_static_asserts<SAX, BasicJsonType> {};
12604 } // namespace detail
12607 // #include <nlohmann/detail/iterators/internal_iterator.hpp>
12618 // #include <nlohmann/detail/abi_macros.hpp>
12620 // #include <nlohmann/detail/iterators/primitive_iterator.hpp>
12634 // #include <nlohmann/detail/macro_scope.hpp>
12638 namespace detail
12752 } // namespace detail
12757 namespace detail
12776 } // namespace detail
12779 // #include <nlohmann/detail/iterators/iter_impl.hpp>
12793 // #include <nlohmann/detail/exceptions.hpp>
12795 // #include <nlohmann/detail/iterators/internal_iterator.hpp>
12797 // #include <nlohmann/detail/iterators/primitive_iterator.hpp>
12799 // #include <nlohmann/detail/macro_scope.hpp>
12801 // #include <nlohmann/detail/meta/cpp_future.hpp>
12803 // #include <nlohmann/detail/meta/type_traits.hpp>
12805 // #include <nlohmann/detail/value_t.hpp>
12809 namespace detail
13254 template < typename IterImpl, detail::enable_if_t < (std::is_same<IterImpl, iter_impl>::value || std::is_same<IterImpl, other_iter_impl>::value), std::nullptr_t > = nullptr >
13290 template < typename IterImpl, detail::enable_if_t < (std::is_same<IterImpl, iter_impl>::value || std::is_same<IterImpl, other_iter_impl>::value), std::nullptr_t > = nullptr >
13536 } // namespace detail
13539 // #include <nlohmann/detail/iterators/iteration_proxy.hpp>
13541 // #include <nlohmann/detail/iterators/json_reverse_iterator.hpp>
13556 // #include <nlohmann/detail/abi_macros.hpp>
13560 namespace detail
13671 } // namespace detail
13674 // #include <nlohmann/detail/iterators/primitive_iterator.hpp>
13676 // #include <nlohmann/detail/json_pointer.hpp>
13700 // #include <nlohmann/detail/exceptions.hpp>
13702 // #include <nlohmann/detail/macro_scope.hpp>
13704 // #include <nlohmann/detail/string_concat.hpp>
13706 // #include <nlohmann/detail/string_escape.hpp>
13708 // #include <nlohmann/detail/value_t.hpp>
13755 return detail::concat(a, '/', detail::escape(b));
13844 JSON_THROW(detail::out_of_range::create(405, "JSON pointer has no parent", nullptr));
13856 JSON_THROW(detail::out_of_range::create(405, "JSON pointer has no parent", nullptr));
13902 JSON_THROW(detail::parse_error::create(106, 0, detail::concat("array index '", s, "' must not begin with '0'"), nullptr));
13908 JSON_THROW(detail::parse_error::create(109, 0, detail::concat("array index '", s, "' is not a number"), nullptr));
13919 JSON_THROW(detail::out_of_range::create(404, detail::concat("unresolved reference token '", s, "'"), nullptr));
13926 JSON_THROW(detail::out_of_range::create(410, detail::concat("array index ", s, " exceeds size_type"), nullptr)); // LCOV_EXCL_LINE
13937 JSON_THROW(detail::out_of_range::create(405, "JSON pointer has no parent", nullptr));
13965 case detail::value_t::null:
13980 case detail::value_t::object:
13987 case detail::value_t::array:
14000 case detail::value_t::string:
14001 case detail::value_t::boolean:
14002 case detail::value_t::number_integer:
14003 case detail::value_t::number_unsigned:
14004 case detail::value_t::number_float:
14005 case detail::value_t::binary:
14006 case detail::value_t::discarded:
14008 JSON_THROW(detail::type_error::create(313, "invalid value to unflatten", &j));
14052 ? detail::value_t::array
14053 : detail::value_t::object;
14058 case detail::value_t::object:
14065 case detail::value_t::array:
14080 case detail::value_t::null:
14081 case detail::value_t::string:
14082 case detail::value_t::boolean:
14083 case detail::value_t::number_integer:
14084 case detail::value_t::number_unsigned:
14085 case detail::value_t::number_float:
14086 case detail::value_t::binary:
14087 case detail::value_t::discarded:
14089 JSON_THROW(detail::out_of_range::create(404, detail::concat("unresolved reference token '", reference_token, "'"), ptr));
14109 case detail::value_t::object:
14116 case detail::value_t::array:
14121 JSON_THROW(detail::out_of_range::create(402, detail::concat(
14131 case detail::value_t::null:
14132 case detail::value_t::string:
14133 case detail::value_t::boolean:
14134 case detail::value_t::number_integer:
14135 case detail::value_t::number_unsigned:
14136 case detail::value_t::number_float:
14137 case detail::value_t::binary:
14138 case detail::value_t::discarded:
14140 JSON_THROW(detail::out_of_range::create(404, detail::concat("unresolved reference token '", reference_token, "'"), ptr));
14167 case detail::value_t::object:
14174 case detail::value_t::array:
14179 JSON_THROW(detail::out_of_range::create(402, detail::concat("array index '-' (", std::to_string(ptr->m_value.array->size()), ") is out of range"), ptr));
14187 case detail::value_t::null:
14188 case detail::value_t::string:
14189 case detail::value_t::boolean:
14190 case detail::value_t::number_integer:
14191 case detail::value_t::number_unsigned:
14192 case detail::value_t::number_float:
14193 case detail::value_t::binary:
14194 case detail::value_t::discarded:
14196 JSON_THROW(detail::out_of_range::create(404, detail::concat("unresolved reference token '", reference_token, "'"), ptr));
14216 case detail::value_t::object:
14223 case detail::value_t::array:
14228 JSON_THROW(detail::out_of_range::create(402, detail::concat(
14238 case detail::value_t::null:
14239 case detail::value_t::string:
14240 case detail::value_t::boolean:
14241 case detail::value_t::number_integer:
14242 case detail::value_t::number_unsigned:
14243 case detail::value_t::number_float:
14244 case detail::value_t::binary:
14245 case detail::value_t::discarded:
14247 JSON_THROW(detail::out_of_range::create(404, detail::concat("unresolved reference token '", reference_token, "'"), ptr));
14265 case detail::value_t::object:
14277 case detail::value_t::array:
14317 case detail::value_t::null:
14318 case detail::value_t::string:
14319 case detail::value_t::boolean:
14320 case detail::value_t::number_integer:
14321 case detail::value_t::number_unsigned:
14322 case detail::value_t::number_float:
14323 case detail::value_t::binary:
14324 case detail::value_t::discarded:
14360 JSON_THROW(detail::parse_error::create(107, 1, detail::concat("JSON pointer must be empty or begin with '/' - was: '", reference_string, "'"), nullptr));
14395 JSON_THROW(detail::parse_error::create(108, 0, "escape character '~' must be followed with '0' or '1'", nullptr));
14400 detail::unescape(reference_token);
14422 case detail::value_t::array:
14434 flatten(detail::concat(reference_string, '/', std::to_string(i)),
14441 case detail::value_t::object:
14453 flatten(detail::concat(reference_string, '/', detail::escape(element.first)), element.second, result);
14459 case detail::value_t::null:
14460 case detail::value_t::string:
14461 case detail::value_t::boolean:
14462 case detail::value_t::number_integer:
14463 case detail::value_t::number_unsigned:
14464 case detail::value_t::number_float:
14465 case detail::value_t::binary:
14466 case detail::value_t::discarded:
14492 JSON_THROW(detail::type_error::create(314, "only objects can be unflattened", &value));
14502 JSON_THROW(detail::type_error::create(315, "values in object must be primitive", &element.second));
14671 // #include <nlohmann/detail/json_ref.hpp>
14685 // #include <nlohmann/detail/abi_macros.hpp>
14687 // #include <nlohmann/detail/meta/type_traits.hpp>
14691 namespace detail
14750 } // namespace detail
14753 // #include <nlohmann/detail/macro_scope.hpp>
14755 // #include <nlohmann/detail/string_concat.hpp>
14757 // #include <nlohmann/detail/string_escape.hpp>
14759 // #include <nlohmann/detail/meta/cpp_future.hpp>
14761 // #include <nlohmann/detail/meta/type_traits.hpp>
14763 // #include <nlohmann/detail/output/binary_writer.hpp>
14785 // #include <nlohmann/detail/input/binary_reader.hpp>
14787 // #include <nlohmann/detail/macro_scope.hpp>
14789 // #include <nlohmann/detail/output/output_adapters.hpp>
14812 // #include <nlohmann/detail/macro_scope.hpp>
14816 namespace detail
14936 } // namespace detail
14939 // #include <nlohmann/detail/string_concat.hpp>
14943 namespace detail
15134 write_compact_float(j.m_value.number_float, detail::input_format_t::cbor);
15458 write_compact_float(j.m_value.number_float, detail::input_format_t::msgpack);
16676 void write_compact_float(const number_float_t n, detail::input_format_t format)
16686 oa->write_character(format == detail::input_format_t::cbor
16693 oa->write_character(format == detail::input_format_t::cbor
16752 } // namespace detail
16755 // #include <nlohmann/detail/output/output_adapters.hpp>
16757 // #include <nlohmann/detail/output/serializer.hpp>
16782 // #include <nlohmann/detail/conversions/to_chars.hpp>
16801 // #include <nlohmann/detail/macro_scope.hpp>
16805 namespace detail
17900 } // namespace detail
17903 // #include <nlohmann/detail/exceptions.hpp>
17905 // #include <nlohmann/detail/macro_scope.hpp>
17907 // #include <nlohmann/detail/meta/cpp_future.hpp>
17909 // #include <nlohmann/detail/output/binary_writer.hpp>
17911 // #include <nlohmann/detail/output/output_adapters.hpp>
17913 // #include <nlohmann/detail/string_concat.hpp>
17915 // #include <nlohmann/detail/value_t.hpp>
17919 namespace detail
18430 string_buffer[bytes++] = detail::binary_writer<BasicJsonType, char>::to_char_type('\xEF');
18431 string_buffer[bytes++] = detail::binary_writer<BasicJsonType, char>::to_char_type('\xBF');
18432 string_buffer[bytes++] = detail::binary_writer<BasicJsonType, char>::to_char_type('\xBD');
18592 template < typename NumberType, detail::enable_if_t <
18707 auto* end = ::nlohmann::detail::to_chars(begin, begin + number_buffer.size(), x);
18871 } // namespace detail
18874 // #include <nlohmann/detail/value_t.hpp>
18898 // #include <nlohmann/detail/macro_scope.hpp>
18900 // #include <nlohmann/detail/meta/type_traits.hpp>
18947 template<class KeyType, detail::enable_if_t<
18948 detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
18967 template<class KeyType, detail::enable_if_t<
18968 detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
18979 template<class KeyType, detail::enable_if_t<
18980 detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
18999 template<class KeyType, detail::enable_if_t<
19000 detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
19027 template<class KeyType, detail::enable_if_t<
19028 detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
19061 template<class KeyType, detail::enable_if_t<
19062 detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
19152 template<class KeyType, detail::enable_if_t<
19153 detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
19178 template<class KeyType, detail::enable_if_t<
19179 detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
19276 template<detail::value_t> friend struct detail::external_constructor;
19284 friend class ::nlohmann::detail::parser;
19285 friend ::nlohmann::detail::serializer<basic_json>;
19287 friend class ::nlohmann::detail::iter_impl;
19289 friend class ::nlohmann::detail::binary_writer;
19291 friend class ::nlohmann::detail::binary_reader;
19293 friend class ::nlohmann::detail::json_sax_dom_parser;
19295 friend class ::nlohmann::detail::json_sax_dom_callback_parser;
19296 friend class ::nlohmann::detail::exception;
19302 // convenience aliases for types residing in namespace detail;
19303 using lexer = ::nlohmann::detail::lexer_base<basic_json>;
19306 static ::nlohmann::detail::parser<basic_json, InputAdapterType> parser(
19308 detail::parser_callback_t<basic_json>cb = nullptr,
19313 return ::nlohmann::detail::parser<basic_json, InputAdapterType>(std::move(adapter),
19318 using primitive_iterator_t = ::nlohmann::detail::primitive_iterator_t;
19320 using internal_iterator = ::nlohmann::detail::internal_iterator<BasicJsonType>;
19322 using iter_impl = ::nlohmann::detail::iter_impl<BasicJsonType>;
19324 using iteration_proxy = ::nlohmann::detail::iteration_proxy<Iterator>;
19325 template<typename Base> using json_reverse_iterator = ::nlohmann::detail::json_reverse_iterator<Base>;
19328 using output_adapter_t = ::nlohmann::detail::output_adapter_t<CharType>;
19331 using binary_reader = ::nlohmann::detail::binary_reader<basic_json, InputType>;
19332 template<typename CharType> using binary_writer = ::nlohmann::detail::binary_writer<basic_json, CharType>;
19335 using serializer = ::nlohmann::detail::serializer<basic_json>;
19338 using value_t = detail::value_t;
19344 using error_handler_t = detail::error_handler_t;
19346 using cbor_tag_handler_t = detail::cbor_tag_handler_t;
19348 using initializer_list_t = std::initializer_list<detail::json_ref<basic_json>>;
19350 using input_format_t = detail::input_format_t;
19362 using exception = detail::exception;
19363 using parse_error = detail::parse_error;
19364 using invalid_iterator = detail::invalid_iterator;
19365 using type_error = detail::type_error;
19366 using out_of_range = detail::out_of_range;
19367 using other_error = detail::other_error;
19432 detail::concat(std::to_string(NLOHMANN_JSON_VERSION_MAJOR), '.',
19456 result["compiler"] = {{"family", "gcc"}, {"version", detail::concat(
19547 using object_comparator_t = detail::actual_object_comparator_t<basic_json>;
19942 if (detail::is_ordered_map<object_t>::value)
19966 using parse_event_t = detail::parse_event_t;
19970 using parser_callback_t = detail::parser_callback_t<basic_json>;
20000 typename U = detail::uncvref_t<CompatibleType>,
20001 detail::enable_if_t <
20002 !detail::is_basic_json<U>::value && detail::is_compatible_type<basic_json_t, U>::value, int > = 0 >
20015 detail::enable_if_t <
20016 detail::is_basic_json<BasicJsonType>::value&& !std::is_same<basic_json, BasicJsonType>::value, int > = 0 >
20077 [](const detail::json_ref<basic_json>& element_ref)
20293 JSON_THROW(invalid_iterator::create(206, detail::concat("cannot construct with iterators from ", first.m_object->type_name()), first.m_object));
20306 detail::enable_if_t<detail::conjunction<detail::is_json_ref<JsonRef>,
20443 serializer s(detail::output_adapter<char, string_t>(result), indent_char, error_handler);
20577 JSON_THROW(type_error::create(302, detail::concat("type must be boolean, but is ", type_name()), this));
20698 JSON_THROW(type_error::create(303, detail::concat("incompatible ReferenceType for get_ref, actual type is ", obj.type_name()), &obj));
20767 detail::enable_if_t <
20768 detail::is_default_constructible<ValueType>::value&&
20769 detail::has_from_json<basic_json_t, ValueType>::value,
20771 ValueType get_impl(detail::priority_tag<0> /*unused*/) const noexcept(noexcept(
20810 detail::enable_if_t <
20811 detail::has_non_default_from_json<basic_json_t, ValueType>::value,
20813 ValueType get_impl(detail::priority_tag<1> /*unused*/) const noexcept(noexcept(
20835 detail::enable_if_t <
20836 detail::is_basic_json<BasicJsonType>::value,
20838 BasicJsonType get_impl(detail::priority_tag<2> /*unused*/) const
20858 detail::enable_if_t<
20861 basic_json get_impl(detail::priority_tag<3> /*unused*/) const
20871 detail::enable_if_t<
20874 constexpr auto get_impl(detail::priority_tag<4> /*unused*/) const noexcept
20905 template < typename ValueTypeCV, typename ValueType = detail::uncvref_t<ValueTypeCV>>
20910 noexcept(std::declval<const basic_json_t&>().template get_impl<ValueType>(detail::priority_tag<4> {})))
20911 -> decltype(std::declval<const basic_json_t&>().template get_impl<ValueType>(detail::priority_tag<4> {}))
20918 return get_impl<ValueType>(detail::priority_tag<4> {});
20959 detail::enable_if_t <
20960 !detail::is_basic_json<ValueType>::value&&
20961 detail::has_from_json<basic_json_t, ValueType>::value,
20973 detail::enable_if_t <
20974 detail::is_basic_json<ValueType>::value,
20985 detail::enable_if_t <
20986 detail::has_from_json<basic_json_t, Array>::value, int > = 0 >
21046 detail::conjunction <
21047 detail::negation<std::is_pointer<ValueType>>,
21048 detail::negation<std::is_same<ValueType, std::nullptr_t>>,
21049 detail::negation<std::is_same<ValueType, detail::json_ref<basic_json>>>,
21050 detail::negation<std::is_same<ValueType, typename string_t::value_type>>,
21051 detail::negation<detail::is_basic_json<ValueType>>,
21052 detail::negation<std::is_same<ValueType, std::initializer_list<typename string_t::value_type>>>,
21054 detail::negation<std::is_same<ValueType, std::string_view>>,
21057 detail::negation<std::is_same<ValueType, std::any>>,
21059 detail::is_detected_lazy<detail::get_template_function, const basic_json_t&, ValueType>
21073 JSON_THROW(type_error::create(302, detail::concat("type must be binary, but is ", type_name()), this));
21085 JSON_THROW(type_error::create(302, detail::concat("type must be binary, but is ", type_name()), this));
21116 JSON_THROW(out_of_range::create(401, detail::concat("array index ", std::to_string(idx), " is out of range"), this));
21121 JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
21139 JSON_THROW(out_of_range::create(401, detail::concat("array index ", std::to_string(idx), " is out of range"), this));
21144 JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
21155 JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
21161 JSON_THROW(out_of_range::create(403, detail::concat("key '", key, "' not found"), this));
21168 template<class KeyType, detail::enable_if_t<
21169 detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int> = 0>
21175 JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
21181 JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
21193 JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
21199 JSON_THROW(out_of_range::create(403, detail::concat("key '", key, "' not found"), this));
21206 template<class KeyType, detail::enable_if_t<
21207 detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int> = 0>
21213 JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
21219 JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
21267 JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this));
21280 JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this));
21302 JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this));
21317 JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this));
21336 template<class KeyType, detail::enable_if_t<
21337 detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int > = 0 >
21355 JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this));
21360 template<class KeyType, detail::enable_if_t<
21361 detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int > = 0 >
21372 JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this));
21377 using is_comparable_with_object_key = detail::is_comparable <
21382 detail::is_c_string_uncvref<ValueType>::value,
21388 template < class ValueType, detail::enable_if_t <
21389 !detail::is_transparent<object_comparator_t>::value
21390 && detail::is_getable<basic_json_t, ValueType>::value
21391 && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 >
21407 JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this));
21413 detail::enable_if_t <
21414 !detail::is_transparent<object_comparator_t>::value
21415 && detail::is_getable<basic_json_t, ReturnType>::value
21416 && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 >
21432 JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this));
21437 template < class ValueType, class KeyType, detail::enable_if_t <
21438 detail::is_transparent<object_comparator_t>::value
21439 && !detail::is_json_pointer<KeyType>::value
21441 && detail::is_getable<basic_json_t, ValueType>::value
21442 && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 >
21458 JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this));
21464 detail::enable_if_t <
21465 detail::is_transparent<object_comparator_t>::value
21466 && !detail::is_json_pointer<KeyType>::value
21468 && detail::is_getable<basic_json_t, ReturnType>::value
21469 && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 >
21485 JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this));
21490 template < class ValueType, detail::enable_if_t <
21491 detail::is_getable<basic_json_t, ValueType>::value
21492 && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 >
21509 JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this));
21515 detail::enable_if_t <
21516 detail::is_getable<basic_json_t, ReturnType>::value
21517 && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 >
21534 JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this));
21537 template < class ValueType, class BasicJsonType, detail::enable_if_t <
21538 detail::is_basic_json<BasicJsonType>::value
21539 && detail::is_getable<basic_json_t, ValueType>::value
21540 && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 >
21548 detail::enable_if_t <
21549 detail::is_basic_json<BasicJsonType>::value
21550 && detail::is_getable<basic_json_t, ReturnType>::value
21551 && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 >
21592 template < class IteratorType, detail::enable_if_t <
21654 JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this));
21662 template < class IteratorType, detail::enable_if_t <
21727 JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this));
21734 template < typename KeyType, detail::enable_if_t <
21735 detail::has_erase_with_key_type<basic_json_t, KeyType>::value, int > = 0 >
21741 JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this));
21747 template < typename KeyType, detail::enable_if_t <
21748 !detail::has_erase_with_key_type<basic_json_t, KeyType>::value, int > = 0 >
21754 JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this));
21779 template<class KeyType, detail::enable_if_t<
21780 detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int> = 0>
21795 JSON_THROW(out_of_range::create(401, detail::concat("array index ", std::to_string(idx), " is out of range"), this));
21802 JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this));
21846 template<class KeyType, detail::enable_if_t<
21847 detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int> = 0>
21862 template<class KeyType, detail::enable_if_t<
21863 detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int> = 0>
21886 template<class KeyType, detail::enable_if_t<
21887 detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int> = 0>
21903 template<class KeyType, detail::enable_if_t<
21904 detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int> = 0>
21917 template<typename BasicJsonType, detail::enable_if_t<detail::is_basic_json<BasicJsonType>::value, int> = 0>
22263 JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this));
22296 JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this));
22328 JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this));
22384 JSON_THROW(type_error::create(311, detail::concat("cannot use emplace_back() with ", type_name()), this));
22409 JSON_THROW(type_error::create(311, detail::concat("cannot use emplace() with ", type_name()), this));
22470 JSON_THROW(type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this));
22497 JSON_THROW(type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this));
22507 JSON_THROW(type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this));
22538 JSON_THROW(type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this));
22558 JSON_THROW(type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this));
22597 JSON_THROW(type_error::create(312, detail::concat("cannot use update() with ", type_name()), this));
22609 JSON_THROW(type_error::create(312, detail::concat("cannot use update() with ", first.m_object->type_name()), first.m_object));
22671 JSON_THROW(type_error::create(310, detail::concat("cannot use swap(array_t&) with ", type_name()), this));
22687 JSON_THROW(type_error::create(310, detail::concat("cannot use swap(object_t&) with ", type_name()), this));
22703 JSON_THROW(type_error::create(310, detail::concat("cannot use swap(string_t&) with ", type_name()), this));
22719 JSON_THROW(type_error::create(310, detail::concat("cannot use swap(binary_t&) with ", type_name()), this));
22735 JSON_THROW(type_error::create(310, detail::concat("cannot use swap(binary_t::container_type&) with ", type_name()), this));
23155 serializer s(detail::output_adapter<char>(o), o.fill());
23192 parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result);
23207 parser(detail::input_adapter(std::move(first), std::move(last)), cb, allow_exceptions, ignore_comments).parse(true, result);
23213 static basic_json parse(detail::span_input_adapter&& i,
23229 return parser(detail::input_adapter(std::forward<InputType>(i)), nullptr, false, ignore_comments).accept(true);
23238 return parser(detail::input_adapter(std::move(first), std::move(last)), nullptr, false, ignore_comments).accept(true);
23243 static bool accept(detail::span_input_adapter&& i,
23258 auto ia = detail::input_adapter(std::forward<InputType>(i));
23261 : detail::binary_reader<basic_json, decltype(ia), SAX>(std::move(ia), format).sax_parse(format, sax, strict);
23273 auto ia = detail::input_adapter(std::move(first), std::move(last));
23276 : detail::binary_reader<basic_json, decltype(ia), SAX>(std::move(ia), format).sax_parse(format, sax, strict);
23287 static bool sax_parse(detail::span_input_adapter&& i, SAX* sax,
23297 : detail::binary_reader<basic_json, decltype(ia), SAX>(std::move(ia), format).sax_parse(format, sax, strict);
23316 parser(detail::input_adapter(i)).parse(false, j);
23391 static void to_cbor(const basic_json& j, detail::output_adapter<std::uint8_t> o)
23398 static void to_cbor(const basic_json& j, detail::output_adapter<char> o)
23414 static void to_msgpack(const basic_json& j, detail::output_adapter<std::uint8_t> o)
23421 static void to_msgpack(const basic_json& j, detail::output_adapter<char> o)
23439 static void to_ubjson(const basic_json& j, detail::output_adapter<std::uint8_t> o,
23447 static void to_ubjson(const basic_json& j, detail::output_adapter<char> o,
23466 static void to_bjdata(const basic_json& j, detail::output_adapter<std::uint8_t> o,
23474 static void to_bjdata(const basic_json& j, detail::output_adapter<char> o,
23491 static void to_bson(const basic_json& j, detail::output_adapter<std::uint8_t> o)
23498 static void to_bson(const basic_json& j, detail::output_adapter<char> o)
23513 detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);
23514 auto ia = detail::input_adapter(std::forward<InputType>(i));
23529 detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);
23530 auto ia = detail::input_adapter(std::move(first), std::move(last));
23549 static basic_json from_cbor(detail::span_input_adapter&& i,
23555 detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);
23571 detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);
23572 auto ia = detail::input_adapter(std::forward<InputType>(i));
23586 detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);
23587 auto ia = detail::input_adapter(std::move(first), std::move(last));
23604 static basic_json from_msgpack(detail::span_input_adapter&& i,
23609 detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);
23625 detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);
23626 auto ia = detail::input_adapter(std::forward<InputType>(i));
23640 detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);
23641 auto ia = detail::input_adapter(std::move(first), std::move(last));
23658 static basic_json from_ubjson(detail::span_input_adapter&& i,
23663 detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);
23680 detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);
23681 auto ia = detail::input_adapter(std::forward<InputType>(i));
23695 detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);
23696 auto ia = detail::input_adapter(std::move(first), std::move(last));
23710 detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);
23711 auto ia = detail::input_adapter(std::forward<InputType>(i));
23725 detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);
23726 auto ia = detail::input_adapter(std::move(first), std::move(last));
23743 static basic_json from_bson(detail::span_input_adapter&& i,
23748 detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);
23770 template<typename BasicJsonType, detail::enable_if_t<detail::is_basic_json<BasicJsonType>::value, int> = 0>
23784 template<typename BasicJsonType, detail::enable_if_t<detail::is_basic_json<BasicJsonType>::value, int> = 0>
23798 template<typename BasicJsonType, detail::enable_if_t<detail::is_basic_json<BasicJsonType>::value, int> = 0>
23812 template<typename BasicJsonType, detail::enable_if_t<detail::is_basic_json<BasicJsonType>::value, int> = 0>
23928 JSON_THROW(out_of_range::create(401, detail::concat("array index ", std::to_string(idx), " is out of range"), &parent));
23969 JSON_THROW(out_of_range::create(403, detail::concat("key '", last_path, "' not found"), this));
23997 const auto error_msg = (op == "op") ? "operation" : detail::concat("operation '", op, '\'');
24003 JSON_THROW(parse_error::create(105, 0, detail::concat(error_msg, " must have member '", member, "'"), &val));
24010 JSON_THROW(parse_error::create(105, 0, detail::concat(error_msg, " must have string member '", member, "'"), &val));
24098 JSON_THROW(other_error::create(501, detail::concat("unsuccessful: ", val.dump()), &val));
24109 JSON_THROW(parse_error::create(105, 0, detail::concat("operation value '", op, "' is invalid"), &val));
24158 auto temp_diff = diff(source[i], target[i], detail::concat(path, '/', std::to_string(i)));
24175 {"path", detail::concat(path, '/', std::to_string(i))}
24186 {"path", detail::concat(path, "/-")},
24201 const auto path_key = detail::concat(path, '/', detail::escape(it.key()));
24225 const auto path_key = detail::concat(path, '/', detail::escape(it.key()));
24345 return nlohmann::detail::hash(j);
24351 struct less< ::nlohmann::detail::value_t> // do not remove the space after '<', see https://github.com/nlohmann/json/pull/679
24357 bool operator()(::nlohmann::detail::value_t lhs,
24358 ::nlohmann::detail::value_t rhs) const noexcept
24363 return ::nlohmann::detail::operator<(lhs, rhs);
24390 // #include <nlohmann/detail/macro_unscope.hpp>