mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add JsonOptions enum class to contain options passed to getJSON methods
This commit is contained in:
@@ -89,7 +89,7 @@ public:
|
||||
STParsedJSONObject parsed ("test", jsonObject);
|
||||
BEAST_EXPECT(parsed.object);
|
||||
std::string const& serialized (
|
||||
to_string (parsed.object->getJson(0)));
|
||||
to_string (parsed.object->getJson(JsonOptions::none)));
|
||||
BEAST_EXPECT(serialized == json);
|
||||
}
|
||||
else
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
if (BEAST_EXPECT(parsed.object))
|
||||
{
|
||||
std::string const& serialized(
|
||||
to_string(parsed.object->getJson(0)));
|
||||
to_string(parsed.object->getJson(JsonOptions::none)));
|
||||
BEAST_EXPECT(serialized == goodJson);
|
||||
}
|
||||
}
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
if (BEAST_EXPECT(parsed.object))
|
||||
{
|
||||
std::string const& serialized(
|
||||
to_string(parsed.object->getJson(0)));
|
||||
to_string(parsed.object->getJson(JsonOptions::none)));
|
||||
BEAST_EXPECT(serialized == expectedJson);
|
||||
}
|
||||
}
|
||||
@@ -311,8 +311,8 @@ public:
|
||||
if (object1.getSerializer () == object2.getSerializer ())
|
||||
{
|
||||
log <<
|
||||
"O1: " << object1.getJson (0) << '\n' <<
|
||||
"O2: " << object2.getJson (0) << std::endl;
|
||||
"O1: " << object1.getJson (JsonOptions::none) << '\n' <<
|
||||
"O2: " << object2.getJson (JsonOptions::none) << std::endl;
|
||||
fail ("STObject error 4");
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1477,8 +1477,8 @@ public:
|
||||
if (copy != j)
|
||||
{
|
||||
log <<
|
||||
"j=" << j.getJson (0) << '\n' <<
|
||||
"copy=" << copy.getJson (0) << std::endl;
|
||||
"j=" << j.getJson (JsonOptions::none) << '\n' <<
|
||||
"copy=" << copy.getJson (JsonOptions::none) << std::endl;
|
||||
fail ("Transaction fails serialize/deserialize test");
|
||||
}
|
||||
else
|
||||
@@ -1486,15 +1486,16 @@ public:
|
||||
pass ();
|
||||
}
|
||||
|
||||
STParsedJSONObject parsed ("test", j.getJson (0));
|
||||
STParsedJSONObject parsed ("test", j.getJson (JsonOptions::none));
|
||||
if (!parsed.object)
|
||||
fail ("Unable to build object from json");
|
||||
|
||||
if (STObject (j) != parsed.object)
|
||||
{
|
||||
log <<
|
||||
"ORIG: " << j.getJson (0) << '\n' <<
|
||||
"BUILT " << parsed.object->getJson (0) << std::endl;
|
||||
"ORIG: " << j.getJson (JsonOptions::none) << '\n' <<
|
||||
"BUILT " << parsed.object->getJson (JsonOptions::none)
|
||||
<< std::endl;
|
||||
fail ("Built a different transaction");
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user