aboutsummaryrefslogtreecommitdiff
path: root/src/rpcclient.cpp
diff options
context:
space:
mode:
authorJonas Schnelli <jonas.schnelli@include7.ch>2015-05-10 15:53:54 +0200
committerJonas Schnelli <jonas.schnelli@include7.ch>2015-06-04 09:16:06 +0200
commit0c5b2cf69ae20f83cbd894bb19d0e111623bae0f (patch)
tree5adf63f805d4908ce5224c83bea99a763dfdf21d /src/rpcclient.cpp
parent21c10de8c2de17a6357dbbcea7613b41f6ab8449 (diff)
downloadbitcoin-0c5b2cf69ae20f83cbd894bb19d0e111623bae0f.tar.xz
univalue: add support for real, fix percision and make it json_spirit compatible
- avoid breaking the API because of different number/percision handling
Diffstat (limited to 'src/rpcclient.cpp')
-rw-r--r--src/rpcclient.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index bedf9ffbcb..aa6d1eff59 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -146,8 +146,9 @@ Array RPCConvertValues(const std::string &strMethod, const std::vector<std::stri
jVal.setBool(false);
else
{
- if (!jVal.read(strVal))
- throw runtime_error(string("Error parsing JSON:")+strVal);
+ if (!jVal.read(strVal) || (jVal.isNull() && strVal.size() > 0))
+ if(!jVal.setNumStr(strVal) || jVal.isNull())
+ throw runtime_error(string("Error parsing JSON:")+strVal);
}
params.push_back(jVal);
}