From 5728dd381d344e8e8fca2df06be0ab7330980b66 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 26 Jan 2016 18:18:56 +0100 Subject: rpc: fix success response encoding for null return value The "result" field of JSON-RPC 2.0 responses was omitted if the result was nil, causing exceptions in web3.js. --- rpc/json.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rpc') diff --git a/rpc/json.go b/rpc/json.go index 8bdb4665d..02bc71c26 100644 --- a/rpc/json.go +++ b/rpc/json.go @@ -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 -- cgit