mirror of
https://github.com/nlohmann/json.git
synced 2026-10-24 14:58:54 +00:00
Merge branch 'claude/implement-5891-deff16' into claude/from-json-arith-array
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
4 files changed
+18
-10
No files matched your search
@@ -349,7 +349,7 @@ class json_sax_dom_error_state
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr bool is_errored() const
|
bool is_errored() const
|
||||||
{
|
{
|
||||||
return errored;
|
return errored;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ class parser
|
|||||||
return finish_input(*sax, strict);
|
return finish_input(*sax, strict);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
#include <nlohmann/detail/abi_macros.hpp> // IWYU pragma: export
|
#include <nlohmann/detail/abi_macros.hpp> // IWYU pragma: export
|
||||||
#include <nlohmann/detail/conversions/from_json.hpp> // IWYU pragma: keep
|
#include <nlohmann/detail/conversions/from_json.hpp> // IWYU pragma: keep
|
||||||
#include <nlohmann/detail/conversions/to_json.hpp> // IWYU pragma: keep
|
#include <nlohmann/detail/conversions/to_json.hpp> // IWYU pragma: keep
|
||||||
#include <nlohmann/detail/exceptions.hpp>
|
#include <nlohmann/detail/exceptions.hpp> // IWYU pragma: export
|
||||||
#include <nlohmann/detail/hash.hpp>
|
#include <nlohmann/detail/hash.hpp>
|
||||||
#include <nlohmann/detail/input/binary_reader.hpp>
|
#include <nlohmann/detail/input/binary_reader.hpp>
|
||||||
#include <nlohmann/detail/input/input_adapters.hpp>
|
#include <nlohmann/detail/input/input_adapters.hpp>
|
||||||
@@ -3144,8 +3144,12 @@ public:
|
|||||||
{
|
{
|
||||||
std::vector<std::uint8_t> result;
|
std::vector<std::uint8_t> result;
|
||||||
result.reserve(detail::binary_initial_capacity(j));
|
result.reserve(detail::binary_initial_capacity(j));
|
||||||
auto writer = vector_writer(result, error_handler);
|
{
|
||||||
write(writer);
|
// the sink sets the size of result when it is destroyed, which
|
||||||
|
// must happen before result is returned (without NRVO, it is moved)
|
||||||
|
auto writer = vector_writer(result, error_handler);
|
||||||
|
write(writer);
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Generated
+9
-5
@@ -8270,7 +8270,7 @@ NLOHMANN_JSON_NAMESPACE_END
|
|||||||
// #include <nlohmann/detail/conversions/to_json.hpp>
|
// #include <nlohmann/detail/conversions/to_json.hpp>
|
||||||
// IWYU pragma: keep
|
// IWYU pragma: keep
|
||||||
// #include <nlohmann/detail/exceptions.hpp>
|
// #include <nlohmann/detail/exceptions.hpp>
|
||||||
|
// IWYU pragma: export
|
||||||
// #include <nlohmann/detail/hash.hpp>
|
// #include <nlohmann/detail/hash.hpp>
|
||||||
// __ _____ _____ _____
|
// __ _____ _____ _____
|
||||||
// __| | __| | | | JSON for Modern C++
|
// __| | __| | | | JSON for Modern C++
|
||||||
@@ -15405,7 +15405,7 @@ class json_sax_dom_error_state
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr bool is_errored() const
|
bool is_errored() const
|
||||||
{
|
{
|
||||||
return errored;
|
return errored;
|
||||||
}
|
}
|
||||||
@@ -21039,7 +21039,7 @@ class parser
|
|||||||
return finish_input(*sax, strict);
|
return finish_input(*sax, strict);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -37870,8 +37870,12 @@ public:
|
|||||||
{
|
{
|
||||||
std::vector<std::uint8_t> result;
|
std::vector<std::uint8_t> result;
|
||||||
result.reserve(detail::binary_initial_capacity(j));
|
result.reserve(detail::binary_initial_capacity(j));
|
||||||
auto writer = vector_writer(result, error_handler);
|
{
|
||||||
write(writer);
|
// the sink sets the size of result when it is destroyed, which
|
||||||
|
// must happen before result is returned (without NRVO, it is moved)
|
||||||
|
auto writer = vector_writer(result, error_handler);
|
||||||
|
write(writer);
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user