| 223 | } |
| 224 | |
| 225 | Object JSONRPCReplyObj(const Value& result, const Value& error, const Value& id) { |
| 226 | Object reply; |
| 227 | if (error.type() != null_type) |
| 228 | reply.push_back(Pair("result", Value::null)); |
| 229 | else |
| 230 | reply.push_back(Pair("result", result)); |
| 231 | reply.push_back(Pair("error", error)); |
| 232 | reply.push_back(Pair("id", id)); |
| 233 | return reply; |
| 234 | } |
| 235 | |
| 236 | string JSONRPCReply(const Value& result, const Value& error, const Value& id) { |
| 237 | Object reply = JSONRPCReplyObj(result, error, id); |
no test coverage detected