#295 Allow RPC ID to be string

This commit is contained in:
Taylor Gerring
2015-02-11 11:56:29 +01:00
parent cfddb7f3cd
commit d613bf69bf
4 changed files with 6 additions and 6 deletions

View File

@ -34,20 +34,20 @@ const (
)
type RpcRequest struct {
ID interface{} `json:"id"`
JsonRpc string `json:"jsonrpc"`
ID int `json:"id"`
Method string `json:"method"`
Params []json.RawMessage `json:"params"`
}
type RpcSuccessResponse struct {
ID int `json:"id"`
ID interface{} `json:"id"`
JsonRpc string `json:"jsonrpc"`
Result interface{} `json:"result"`
}
type RpcErrorResponse struct {
ID *int `json:"id"`
ID interface{} `json:"id"`
JsonRpc string `json:"jsonrpc"`
Error *RpcErrorObject `json:"error"`
}