code: func NewRequest(id interface{}, method string, params []interface{}) (*Request, error) {
  	if !IsValidIDType(id) {
  		str := fmt.Sprintf("the id of type '%T' is invalid", id)
  		return nil, makeError(ErrInvalidType, str)
  	}
  
  	rawParams := make([]json.RawMessage, 0, len(params))
  	for _, param := range params {
  		marshalledParam, err := json.Marshal(param)
  		if err != nil {
  			return nil, err
  		}
  		rawMessage := json.RawMessage(marshalledParam)
  		rawParams = append(rawParams, rawMessage)
  	}
  
  	return &Request{
  		Jsonrpc: "1.0",
  		ID:      id,
  		Method:  method,
  		Params:  rawParams,
  	}, nil
  }
docs: // NewRequest returns a new JSON-RPC 1.0 request object given the provided id,
  // method, and parameters.  The parameters are marshalled into a json.RawMessage
  // for the Params field of the returned request object.  This function is only
  // provided in case the caller wants to construct raw requests for some reason.
  //
  // Typically callers will instead want to create a registered concrete command
  // type with the NewCmd or New<Foo>Cmd functions and call the MarshalCmd
  // function with that command to generate the marshalled JSON-RPC request.