diff options
| author | Jeff Garzik <[email protected]> | 2013-10-22 07:25:54 -0700 |
|---|---|---|
| committer | Jeff Garzik <[email protected]> | 2013-10-22 07:25:54 -0700 |
| commit | fcb9f264668f4bb335e1201770d84884bb7a226e (patch) | |
| tree | 2f82a6eae2594034c6dca7af07d5c79d363b438d /src/bitcoinrpc.cpp | |
| parent | Merge pull request #3082 from laanwj/2013_10_rpccli3 (diff) | |
| parent | Revert "JSON Spirit updated to v4.06" (diff) | |
| download | discoin-fcb9f264668f4bb335e1201770d84884bb7a226e.tar.xz discoin-fcb9f264668f4bb335e1201770d84884bb7a226e.zip | |
Merge pull request #3127 from jgarzik/smells-like-json-spirit
Revert recent json-spirit changes
Diffstat (limited to 'src/bitcoinrpc.cpp')
| -rw-r--r-- | src/bitcoinrpc.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 93ab9a477..f2a52e92e 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -31,8 +31,6 @@ using namespace boost; using namespace boost::asio; using namespace json_spirit; -static const char* Value_type_name[]={"obj", "array", "str", "bool", "int", "real", "null"}; - static std::string strRPCUserColonPass; // These are created by StartRPCThreads, destroyed in StopRPCThreads @@ -533,7 +531,7 @@ string JSONRPCRequest(const string& strMethod, const Array& params, const Value& request.push_back(Pair("method", strMethod)); request.push_back(Pair("params", params)); request.push_back(Pair("id", id)); - return write_string(Value(request), raw_utf8) + "\n"; + return write_string(Value(request), false) + "\n"; } Object JSONRPCReplyObj(const Value& result, const Value& error, const Value& id) @@ -551,7 +549,7 @@ Object JSONRPCReplyObj(const Value& result, const Value& error, const Value& id) string JSONRPCReply(const Value& result, const Value& error, const Value& id) { Object reply = JSONRPCReplyObj(result, error, id); - return write_string(Value(reply), raw_utf8) + "\n"; + return write_string(Value(reply), false) + "\n"; } void ErrorReply(std::ostream& stream, const Object& objError, const Value& id) @@ -982,7 +980,7 @@ static string JSONRPCExecBatch(const Array& vReq) for (unsigned int reqIdx = 0; reqIdx < vReq.size(); reqIdx++) ret.push_back(JSONRPCExecOne(vReq[reqIdx])); - return write_string(Value(ret), raw_utf8) + "\n"; + return write_string(Value(ret), false) + "\n"; } void ServiceConnection(AcceptedConnection *conn) @@ -1284,7 +1282,7 @@ int CommandLineRPC(int argc, char *argv[]) if (error.type() != null_type) { // Error - strPrint = "error: " + write_string(error, raw_utf8); + strPrint = "error: " + write_string(error, false); int code = find_value(error.get_obj(), "code").get_int(); nRet = abs(code); } @@ -1296,7 +1294,7 @@ int CommandLineRPC(int argc, char *argv[]) else if (result.type() == str_type) strPrint = result.get_str(); else - strPrint = write_string(result, pretty_print | raw_utf8); + strPrint = write_string(result, true); } } catch (boost::thread_interrupted) { |