Replace json_spirit with nlohmann/json via compatibility shim
Remove all json_spirit source files and add nlohmann/json (v3.11.3) with a json_compat.h shim that preserves the json_spirit namespace API. Updates all RPC and test files to use the new JSON backend. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -73,7 +73,7 @@ void RPCTypeCheck(const Array& params,
|
||||
if (!((v.type() == t) || (fAllowNull && (v.type() == null_type))))
|
||||
{
|
||||
string err = strprintf("Expected type %s, got %s",
|
||||
Value_type_name[t], Value_type_name[v.type()]);
|
||||
ValueTypeName(t), ValueTypeName(v.type()));
|
||||
throw JSONRPCError(RPC_TYPE_ERROR, err);
|
||||
}
|
||||
i++;
|
||||
@@ -93,7 +93,7 @@ void RPCTypeCheck(const Object& o,
|
||||
if (!((v.type() == t.second) || (fAllowNull && (v.type() == null_type))))
|
||||
{
|
||||
string err = strprintf("Expected type %s for %s, got %s",
|
||||
Value_type_name[t.second], t.first.c_str(), Value_type_name[v.type()]);
|
||||
ValueTypeName(t.second), t.first.c_str(), ValueTypeName(v.type()));
|
||||
throw JSONRPCError(RPC_TYPE_ERROR, err);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user