extend conversion to UniValue

This commit is contained in:
Jonas Schnelli
2015-05-10 13:35:44 +02:00
parent 15982a8b69
commit 53b4671a9d
13 changed files with 76 additions and 69 deletions

View File

@@ -256,7 +256,7 @@ int ReadHTTPMessage(std::basic_istream<char>& stream, map<string,
string JSONRPCRequest(const string& strMethod, const Array& params, const Value& id)
{
Object request;
Object request(UniValue::VOBJ);
request.push_back(Pair("method", strMethod));
request.push_back(Pair("params", params));
request.push_back(Pair("id", id));
@@ -265,7 +265,7 @@ string JSONRPCRequest(const string& strMethod, const Array& params, const Value&
Object JSONRPCReplyObj(const Value& result, const Value& error, const Value& id)
{
Object reply;
Object reply(UniValue::VOBJ);
if (!error.isNull())
reply.push_back(Pair("result", NullUniValue));
else
@@ -283,7 +283,7 @@ string JSONRPCReply(const Value& result, const Value& error, const Value& id)
Object JSONRPCError(int code, const string& message)
{
Object error;
UniValue error(UniValue::VOBJ);
error.push_back(Pair("code", code));
error.push_back(Pair("message", message));
return error;