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:
Mayukha Vadari
2025-12-15 10:40:08 -08:00
committed by GitHub
parent f816ffa55f
commit 41c1be2bac
16 changed files with 100 additions and 1022 deletions

View File

@@ -160,6 +160,24 @@ constexpr ErrorInfo unknownError;
//------------------------------------------------------------------------------
void
inject_error(error_code_i code, Json::Value& json)
{
ErrorInfo const& info(get_error_info(code));
json[jss::error] = info.token;
json[jss::error_code] = info.code;
json[jss::error_message] = info.message;
}
void
inject_error(error_code_i code, std::string const& message, Json::Value& json)
{
ErrorInfo const& info(get_error_info(code));
json[jss::error] = info.token;
json[jss::error_code] = info.code;
json[jss::error_message] = message;
}
ErrorInfo const&
get_error_info(error_code_i code)
{