You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
318 B

  1. package jsonrpc
  2. import "github.com/intel-go/fastjson"
  3. // Unmarshal decodes JSON-RPC params.
  4. func Unmarshal(params *fastjson.RawMessage, dst interface{}) *Error {
  5. if params == nil {
  6. return ErrInvalidParams()
  7. }
  8. if err := fastjson.Unmarshal(*params, dst); err != nil {
  9. return ErrInvalidParams()
  10. }
  11. return nil
  12. }