code: func NewResponse(id interface{}, marshalledResult []byte, rpcErr *RPCError) (*Response, error) {
  	if !IsValidIDType(id) {
  		str := fmt.Sprintf("the id of type '%T' is invalid", id)
  		return nil, makeError(ErrInvalidType, str)
  	}
  
  	pid := &id
  	return &Response{
  		Result: marshalledResult,
  		Error:  rpcErr,
  		ID:     pid,
  	}, nil
  }
docs: // NewResponse returns a new JSON-RPC response object given the provided id,
  // marshalled result, and RPC error.  This function is only provided in case the
  // caller wants to construct raw responses for some reason.
  //
  // Typically callers will instead want to create the fully marshalled JSON-RPC
  // response to send over the wire with the MarshalResponse function.