mirror of
https://github.com/nlohmann/json.git
synced 2026-10-03 05:00:30 +00:00
Merge branch 'develop' into fix/scalar-comparison-noexcept
Conflict in operator_ne.md: took develop's corrected page (#5638 documents that there is no C++20 member operator!=) and re-added this branch's conditional noexcept for overload (2) and its version history note. Ran make amalgamate. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
@@ -54,8 +54,9 @@ using parser_callback_t =
|
||||
/*!
|
||||
@brief syntax analysis
|
||||
|
||||
This class implements an iterative parser that keeps the open containers on
|
||||
an explicit stack and reports what it reads as SAX events.
|
||||
This class implements a parser for JSON text. Nested arrays and objects are tracked with an explicit
|
||||
stack instead of recursion, so deeply nested input does not exhaust the call stack, and what is read
|
||||
is reported as SAX events.
|
||||
*/
|
||||
template<typename BasicJsonType, typename InputAdapterType>
|
||||
class parser
|
||||
|
||||
@@ -78,7 +78,7 @@ class json_pointer
|
||||
}
|
||||
|
||||
/// @brief return a string representation of the JSON pointer
|
||||
/// @sa https://json.nlohmann.me/api/json_pointer/operator_string/
|
||||
/// @sa https://json.nlohmann.me/api/json_pointer/operator_string_t/
|
||||
JSON_HEDLEY_DEPRECATED_FOR(3.11.0, to_string())
|
||||
operator string_t() const
|
||||
{
|
||||
@@ -87,7 +87,7 @@ class json_pointer
|
||||
|
||||
#ifndef JSON_NO_IO
|
||||
/// @brief write string representation of the JSON pointer to stream
|
||||
/// @sa https://json.nlohmann.me/api/basic_json/operator_ltlt/
|
||||
/// @sa https://json.nlohmann.me/api/operator_ltlt/
|
||||
friend std::ostream& operator<<(std::ostream& o, const json_pointer& ptr)
|
||||
{
|
||||
o << ptr.to_string();
|
||||
@@ -1099,7 +1099,8 @@ class json_pointer
|
||||
friend bool operator!=(const StringType& lhs,
|
||||
const json_pointer<RefStringTypeRhs>& rhs);
|
||||
|
||||
/// @brief compares two JSON pointer for less-than
|
||||
/// @brief compares two JSON pointers for less-than
|
||||
/// @sa https://json.nlohmann.me/api/json_pointer/operator_spaceship/
|
||||
template<typename RefStringTypeLhs, typename RefStringTypeRhs>
|
||||
// NOLINTNEXTLINE(readability-redundant-declaration)
|
||||
friend bool operator<(const json_pointer<RefStringTypeLhs>& lhs,
|
||||
|
||||
@@ -298,7 +298,7 @@ void templated_json_throw(ExceptionType exception)
|
||||
@brief macro to briefly define a mapping between an enum and JSON with exception
|
||||
on invalid input
|
||||
@def NLOHMANN_JSON_SERIALIZE_ENUM_STRICT
|
||||
@since version 3.12.0
|
||||
@since version 3.13.0
|
||||
*/
|
||||
#define NLOHMANN_JSON_SERIALIZE_ENUM_STRICT(ENUM_TYPE, ...) \
|
||||
template<typename BasicJsonType> \
|
||||
|
||||
@@ -5128,7 +5128,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
/// @{
|
||||
#ifndef JSON_NO_IO
|
||||
/// @brief serialize to stream
|
||||
/// @sa https://json.nlohmann.me/api/basic_json/operator_ltlt/
|
||||
/// @sa https://json.nlohmann.me/api/operator_ltlt/
|
||||
friend std::ostream& operator<<(std::ostream& o, const basic_json& j)
|
||||
{
|
||||
// read width member and use it as the indentation parameter if nonzero
|
||||
@@ -5147,7 +5147,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
}
|
||||
|
||||
/// @brief serialize to stream
|
||||
/// @sa https://json.nlohmann.me/api/basic_json/operator_ltlt/
|
||||
/// @sa https://json.nlohmann.me/api/operator_ltlt/
|
||||
/// @deprecated This function is deprecated since 3.0.0 and will be removed in
|
||||
/// version 4.0.0 of the library. Please use
|
||||
/// operator<<(std::ostream&, const basic_json&) instead; that is,
|
||||
@@ -5316,7 +5316,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
#endif
|
||||
#ifndef JSON_NO_IO
|
||||
/// @brief deserialize from stream
|
||||
/// @sa https://json.nlohmann.me/api/basic_json/operator_gtgt/
|
||||
/// @sa https://json.nlohmann.me/api/operator_gtgt/
|
||||
/// @deprecated This stream operator is deprecated since 3.0.0 and will be removed in
|
||||
/// version 4.0.0 of the library. Please use
|
||||
/// operator>>(std::istream&, basic_json&) instead; that is,
|
||||
@@ -5328,7 +5328,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
}
|
||||
|
||||
/// @brief deserialize from stream
|
||||
/// @sa https://json.nlohmann.me/api/basic_json/operator_gtgt/
|
||||
/// @sa https://json.nlohmann.me/api/operator_gtgt/
|
||||
friend std::istream& operator>>(std::istream& i, basic_json& j)
|
||||
{
|
||||
// parse into a temporary so that j is left unchanged if parsing fails
|
||||
|
||||
Reference in New Issue
Block a user