1
0
mirror of https://github.com/golang/go synced 2024-11-18 11:24:41 -07:00
go/internal/jsonrpc2
Thomas dcbf2a9ed1 internal/jsonrpc2: omit empty error data
The spec states error data may be omitted. It is currently always encoded
as null, despite having no usage.

Omit the field if empty, and add a test to prove the behaviour.

Fixes golang/go#39736

Change-Id: Icdb39409010f3a42f84d2372c2061e4bc7cc198e
Reviewed-on: https://go-review.googlesource.com/c/tools/+/239059
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2020-06-24 06:08:01 +00:00
..
servertest internal/jsonrpc2/servertest: replace closerList with connList 2020-06-18 12:08:28 +00:00
conn.go internal/jsonrpc2: change jsonrpc2.Conn to be an interface 2020-06-03 17:06:45 +00:00
handler.go internal/event: renaming the main event API functions 2020-04-23 17:21:36 +00:00
jsonrpc2_test.go internal/jsonrpc2: change jsonrpc2.Conn to be an interface 2020-06-03 17:06:45 +00:00
jsonrpc2.go internal/jsonrpc2: change jsonrpc2.Conn to be an interface 2020-06-03 17:06:45 +00:00
messages.go internal/jsonrpc2: don't set result in response if there is an error 2020-06-22 15:00:58 +00:00
serve_test.go internal/stack: add the leak test 2020-05-27 14:25:42 +00:00
serve.go internal/jsonrpc2: try to suppress unnecessary errors on shutdown 2020-06-11 19:17:06 +00:00
stream.go internal/jsonrpc2: switch to building streams on top of net.Conn 2020-06-03 13:12:18 +00:00
wire_test.go internal/jsonrpc2: omit empty error data 2020-06-24 06:08:01 +00:00
wire.go internal/jsonrpc2: omit empty error data 2020-06-24 06:08:01 +00:00