Use jss for many Json fields.

* Document JsonFields.
  * Remove some unused JsonFields values.
This commit is contained in:
Tom Ritchford
2015-02-10 16:54:27 -05:00
parent 558c6b621b
commit 315a8b6b60
82 changed files with 1449 additions and 869 deletions

View File

@@ -25,6 +25,7 @@
#include <ripple/resource/impl/Import.h>
#include <ripple/basics/UnorderedContainers.h>
#include <ripple/json/json_value.h>
#include <ripple/protocol/JsonFields.h>
#include <beast/chrono/abstract_clock.h>
#include <beast/Insight.h>
#include <beast/threads/SharedData.h>
@@ -253,9 +254,9 @@ public:
if ((localBalance + inboundEntry.remote_balance) >= threshold)
{
Json::Value& entry = (ret[inboundEntry.to_string()] = Json::objectValue);
entry["local"] = localBalance;
entry["remote"] = inboundEntry.remote_balance;
entry["type"] = "outbound";
entry[jss::local] = localBalance;
entry[jss::remote] = inboundEntry.remote_balance;
entry[jss::type] = "outbound";
}
}
@@ -265,9 +266,9 @@ public:
if ((localBalance + outboundEntry.remote_balance) >= threshold)
{
Json::Value& entry = (ret[outboundEntry.to_string()] = Json::objectValue);
entry["local"] = localBalance;
entry["remote"] = outboundEntry.remote_balance;
entry["type"] = "outbound";
entry[jss::local] = localBalance;
entry[jss::remote] = outboundEntry.remote_balance;
entry[jss::type] = "outbound";
}
}
@@ -277,9 +278,9 @@ public:
if ((localBalance + adminEntry.remote_balance) >= threshold)
{
Json::Value& entry = (ret[adminEntry.to_string()] = Json::objectValue);
entry["local"] = localBalance;
entry["remote"] = adminEntry.remote_balance;
entry["type"] = "admin";
entry[jss::local] = localBalance;
entry[jss::remote] = adminEntry.remote_balance;
entry[jss::type] = "admin";
}
}