Throw out_of_range.411 for JSON Patch add into a null parent (#5917) (#5918)

Claude-Session: https://claude.ai/code/session_01MKJf48vnGtTE25KscmjfaW

Signed-off-by: Niels Lohmann <niels.lohmann@gmail.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Niels LohmannandClaude Sonnet 5.5 authored and GitHub committed 2026-10-26 17:11:25 +01:00
1 parent 2a56afc714
commit d6431a9104
6 files changed
+24 -2

No files matched your search

+1 -1
View File
@@ -7003,7 +7003,6 @@ public:
switch (parent.m_data.m_type)
{
case value_t::null:
case value_t::object:
{
// use operator[] to add value
@@ -7035,6 +7034,7 @@ public:
// the parent of an "add" target must be an object or array
// (see #4292)
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer: