Closed samherrmann closed 1 year ago
I definitely feel like making this change was a good move considering how simple it is for users to send an explicit null
value if they so desire:
conn.Call(ctx, method, json.RawMessage("null"), &result)
Once this lands, can we have a 0.2.0
release? That would ensure that the example tests are available when someone visits https://pkg.go.dev/github.com/sourcegraph/jsonrpc2.
With this commit, the JSON encoding of
Request
always omits the params member when callingConn.Call
,Conn.DispatchCall
, orConn.Notify
with theparams
argument set tonil
. This change also removes theOmitNilParams
call option that was added in commit 8012d496 (#62).As of this commit, if users desire to send a JSON-RPC request with a
params
value ofnull
, then they may do so by explicitly setting theparams
argument ofConn.Call
/Conn.DispatchCall
/Conn.Notify
tojson.RawMessage("null")
.