1
package jsonrpc
2

3
import "github.com/intel-go/fastjson"
4

5
// Unmarshal decodes JSON-RPC params.
6
func Unmarshal(params *fastjson.RawMessage, dst interface{}) *Error {
7 6
	if params == nil {
8 6
		return ErrInvalidParams()
9
	}
10 6
	if err := fastjson.Unmarshal(*params, dst); err != nil {
11 6
		return ErrInvalidParams()
12
	}
13 6
	return nil
14
}

Read our documentation on viewing source code .

Loading