| 45 | } |
| 46 | |
| 47 | void RpcProtocolServerV1::WrapResult(const Json::Value &request, Json::Value &response, Json::Value &retValue) { |
| 48 | response[KEY_RESPONSE_RESULT] = retValue; |
| 49 | response[KEY_RESPONSE_ERROR] = Json::nullValue; |
| 50 | response[KEY_REQUEST_ID] = request[KEY_REQUEST_ID]; |
| 51 | } |
| 52 | |
| 53 | void RpcProtocolServerV1::WrapError(const Json::Value &request, int code, const std::string &message, Json::Value &result) { |
| 54 | result["error"]["code"] = code; |