diff options
Diffstat (limited to 'test/RPCSession.cpp')
-rw-r--r-- | test/RPCSession.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/test/RPCSession.cpp b/test/RPCSession.cpp index 60aafc85..69c75cee 100644 --- a/test/RPCSession.cpp +++ b/test/RPCSession.cpp @@ -23,8 +23,7 @@ #include <libdevcore/CommonData.h> -#include <json/reader.h> -#include <json/writer.h> +#include <libdevcore/JSON.h> #include <string> #include <stdio.h> @@ -216,7 +215,7 @@ string RPCSession::personal_newAccount(string const& _password) void RPCSession::test_setChainParams(vector<string> const& _accounts) { - static std::string const c_configString = R"( + static string const c_configString = R"( { "sealEngine": "NoProof", "params": { @@ -249,10 +248,10 @@ void RPCSession::test_setChainParams(vector<string> const& _accounts) )"; Json::Value config; - BOOST_REQUIRE(Json::Reader().parse(c_configString, config)); + BOOST_REQUIRE(jsonParseStrict(c_configString, config)); for (auto const& account: _accounts) config["accounts"][account]["wei"] = "0x100000000000000000000000000000000000000000"; - test_setChainParams(Json::FastWriter().write(config)); + test_setChainParams(jsonCompactPrint(config)); } void RPCSession::test_setChainParams(string const& _config) @@ -328,7 +327,7 @@ Json::Value RPCSession::rpcCall(string const& _methodName, vector<string> const& BOOST_TEST_MESSAGE("Reply: " + reply); Json::Value result; - BOOST_REQUIRE(Json::Reader().parse(reply, result, false)); + BOOST_REQUIRE(jsonParseStrict(reply, result)); if (result.isMember("error")) { @@ -371,6 +370,5 @@ string RPCSession::TransactionData::toJson() const json["gasprice"] = gasPrice; json["value"] = value; json["data"] = data; - return Json::FastWriter().write(json); - + return jsonCompactPrint(json); } |