Add JsonOptions enum class to contain options passed to getJSON methods

This commit is contained in:
Mo Morsi
2019-06-08 01:10:33 -04:00
committed by Manoj doshi
parent c2138c4e88
commit f8365f5009
77 changed files with 382 additions and 270 deletions

View File

@@ -51,10 +51,10 @@ class Ticket_test : public beast::unit_test::suite
bool expiration = false)
{
using namespace std::string_literals;
auto const& tx = env.tx ()->getJson (0);
auto const& tx = env.tx ()->getJson (JsonOptions::none);
bool is_cancel = tx[jss::TransactionType] == jss::TicketCancel;
auto const& jvm = env.meta ()->getJson (0);
auto const& jvm = env.meta ()->getJson (JsonOptions::none);
std::array<Json::Value, 4> retval;
// these are the affected nodes that we expect for
@@ -315,7 +315,7 @@ class Ticket_test : public beast::unit_test::suite
env (ticket::create (env.master, expire));
// in the case of past expiration, we only get
// one meta node entry returned
auto const& jvm = env.meta ()->getJson (0);
auto const& jvm = env.meta ()->getJson (JsonOptions::none);
BEAST_EXPECT(jvm.isMember(sfAffectedNodes.fieldName));
BEAST_EXPECT(jvm[sfAffectedNodes.fieldName].isArray());
BEAST_EXPECT(jvm[sfAffectedNodes.fieldName].size() == 1);