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

@@ -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