mirror of
https://github.com/sourcegraph/jsonrpc2.git
synced 2026-06-16 04:04:56 +02:00
No description
The JSON-RPC 2.0 specification allows the data member of an error object to be omitted. Before this commit, if Error.Data was nil then the JSON encoding was "null". That means that the data member was included in every JSON-RPC error object, even when the data member was not explicitly set. This commit adds the omitempty struct tag to the Error.Data field, meaning that the data member is omitted from the JSON encoding unless explicitly set with the Error.SetError() method. Beware that this is a breaking change for clients that may have strict null checks on the data member. |
||
|---|---|---|
| .github/workflows | ||
| websocket | ||
| .travis.yml | ||
| async.go | ||
| call_opt.go | ||
| call_opt_test.go | ||
| codec_test.go | ||
| conn.go | ||
| conn_opt.go | ||
| conn_opt_test.go | ||
| conn_test.go | ||
| go.mod | ||
| go.sum | ||
| handler_with_error.go | ||
| internal_test.go | ||
| jsonrpc2.go | ||
| jsonrpc2_test.go | ||
| LICENSE | ||
| README.md | ||
| request.go | ||
| request_test.go | ||
| response.go | ||
| response_test.go | ||
| stream.go | ||
jsonrpc2: JSON-RPC 2.0 implementation for Go

Package jsonrpc2 provides a Go implementation of JSON-RPC 2.0.
This package is experimental until further notice.
Known issues
- Batch requests and responses are not yet supported.