mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
refactor: remove Json::Object and related files/classes (#5894)
`Json::Object` and related objects are not used at all, so this change removes `include/xrpl/json/Object.h` and all downstream files. There are a number of minor downstream changes as well. Full list of deleted classes and functions: * `Json::Collections` * `Json::Object` * `Json::Array` * `Json::WriterObject` * `Json::setArray` * `Json::addObject` * `Json::appendArray` * `Json::appendObject` The last helper function, `copyFrom`, seemed a bit more complex and was actually used in a few places, so it was moved to `LedgerToJson.h` instead of deleting it.
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
#include <xrpld/rpc/RPCCall.h>
|
||||
|
||||
#include <xrpl/basics/contract.h>
|
||||
#include <xrpl/json/Object.h>
|
||||
#include <xrpl/protocol/ErrorCodes.h>
|
||||
#include <xrpl/protocol/HashPrefix.h>
|
||||
#include <xrpl/protocol/Indexes.h>
|
||||
@@ -83,7 +82,7 @@ cmdToJSONRPC(
|
||||
// If paramsObj is not empty, put it in a [params] array.
|
||||
if (paramsObj.begin() != paramsObj.end())
|
||||
{
|
||||
auto& paramsArray = Json::setArray(jv, jss::params);
|
||||
auto& paramsArray = jv[jss::params] = Json::arrayValue;
|
||||
paramsArray.append(paramsObj);
|
||||
}
|
||||
if (paramsObj.isMember(jss::jsonrpc))
|
||||
|
||||
Reference in New Issue
Block a user