diff options
| author | Jonas Schnelli <[email protected]> | 2015-05-10 15:53:54 +0200 |
|---|---|---|
| committer | Jonas Schnelli <[email protected]> | 2015-06-04 09:16:06 +0200 |
| commit | 0c5b2cf69ae20f83cbd894bb19d0e111623bae0f (patch) | |
| tree | 5adf63f805d4908ce5224c83bea99a763dfdf21d /src/rpcclient.cpp | |
| parent | special threatment for null,true,false because they are non valid json (diff) | |
| download | discoin-0c5b2cf69ae20f83cbd894bb19d0e111623bae0f.tar.xz discoin-0c5b2cf69ae20f83cbd894bb19d0e111623bae0f.zip | |
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.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp index bedf9ffbc..aa6d1eff5 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); } |