ID must be present in both request and response

from the spec:
This member is REQUIRED.
It MUST be the same as the value of the id member in the Request Object.
If there was an error in detecting the id in the Request object (e.g. Parse error/Invalid Request), it MUST be Null.
This commit is contained in:
Anton Kaliaev 2017-09-18 12:04:05 -07:00 committed by Ethan Buchman
parent 7fadde0b37
commit 95875c55fc
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ type RPCError struct {
type RPCResponse struct {
JSONRPC string `json:"jsonrpc"`
ID string `json:"id,omitempty"`
ID string `json:"id"`
Result *json.RawMessage `json:"result,omitempty"`
Error *RPCError `json:"error,omitempty"`
}