extend conversion to UniValue
This commit is contained in:
committed by
Jack Grigg
parent
ed21d5bd4b
commit
9756b7bd29
@@ -258,7 +258,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));
|
||||
@@ -267,7 +267,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
|
||||
@@ -285,7 +285,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;
|
||||
|
||||
Reference in New Issue
Block a user