Skip to content

Commit

Permalink
rpc: fix success response encoding for null return value
Browse files Browse the repository at this point in the history
The "result" field of JSON-RPC 2.0 responses was omitted
if the result was nil, causing exceptions in web3.js.
  • Loading branch information
fjl committed Jan 26, 2016
1 parent 63e7648 commit 5728dd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpc/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type JSONRequest struct {
type JSONSuccessResponse struct {
Version string `json:"jsonrpc"`
Id int64 `json:"id"`
Result interface{} `json:"result,omitempty"`
Result interface{} `json:"result"`
}

// JSON-RPC error object
Expand Down

0 comments on commit 5728dd3

Please sign in to comment.