sourcegraph / jsonrpc2

Package jsonrpc2 provides a client and server implementation of JSON-RPC 2.0 (http://www.jsonrpc.org/specification)
MIT License
190 stars 62 forks source link

Homogenize treatment of params and meta in UnmarshalJSON #52

Closed lhchavez closed 3 years ago

lhchavez commented 3 years ago

This change makes the treatment of params and meta the same, by assigning a well-known pointer at first to detect if the unmarshaling process overwrites it with an explicit nil, or it stays the same in which it means that it was unset from the beginning.