ParseRequestArguments tries to parse the given params (json.RawMessage) with the given types. It returns the parsed values or an error when the parsing failed.
(argTypes []reflect.Type, params interface{})
| 273 | // ParseRequestArguments tries to parse the given params (json.RawMessage) with the given |
| 274 | // types. It returns the parsed values or an error when the parsing failed. |
| 275 | func (c *jsonCodec) ParseRequestArguments(argTypes []reflect.Type, params interface{}) ([]reflect.Value, Error) { |
| 276 | if args, ok := params.(json.RawMessage); !ok { |
| 277 | return nil, &invalidParamsError{"Invalid params supplied"} |
| 278 | } else { |
| 279 | return parsePositionalArguments(args, argTypes) |
| 280 | } |
| 281 | } |
| 282 | |
| 283 | // parsePositionalArguments tries to parse the given args to an array of values with the |
| 284 | // given types. It returns the parsed values or an error when the args could not be |