diff --git a/extension/json/include/json_executors.hpp b/extension/json/include/json_executors.hpp index b5505a13ae1f..10619d485d4b 100644 --- a/extension/json/include/json_executors.hpp +++ b/extension/json/include/json_executors.hpp @@ -46,11 +46,7 @@ struct JSONExecutors { // compute mutable result auto new_val = fun(mut_doc->root, alc, result); - // Convert mutable value back to immutable document - doc = yyjson_mut_val_imut_copy(new_val, alc); - - // Convert immutable yyjson document back into string - return JSONCommon::WriteVal(doc->root, alc); + return JSONCommon::WriteVal(new_val, alc); }); } @@ -154,11 +150,7 @@ struct JSONExecutors { // Compute mutable value auto new_val = fun(mut_ldoc->root, right, alc, result); - // Convert mutable value back to immutable document - ldoc = yyjson_mut_val_imut_copy(new_val, alc); - - // Convert immutable yyjson document back into string - return JSONCommon::WriteVal(ldoc->root, alc); + return JSONCommon::WriteVal(new_val, alc); }); } @@ -185,11 +177,7 @@ struct JSONExecutors { // Compute mutable value auto new_val = fun(mut_doc->root, first, second, alc, result); - // mutable value back to immutable document - doc = yyjson_mut_val_imut_copy(new_val, alc); - - // immutable document back to string - return JSONCommon::WriteVal(doc->root, alc); + return JSONCommon::WriteVal(new_val, alc); }); }