Versions in this module Expand all Collapse all v0 v0.9.0 Jun 16, 2026 Changes in this version + type DecodeOption func(*decodeOptions) + func WithAllowJSONRPC1() DecodeOption v0.8.2 Nov 28, 2025 v0.8.2-rc.1 Nov 28, 2025 v0.8.1 Oct 21, 2025 Changes in this version type Response + func (r *Response) WithID(newID any) (*Response, error) v0.8.0 Oct 8, 2025 Changes in this version + func SetPerformanceProfile(profile PerformanceProfile) + type PerformanceProfile int + const ProfileAggressive + const ProfileBalanced + const ProfileCompatible + const ProfileDefault + const ProfileFast + func GetPerformanceProfile() PerformanceProfile type Response + func (r *Response) Clone() (*Response, error) + func (r *Response) Free() + func (r *Response) PeekBytesByPath(path ...any) ([]byte, error) + func (r *Response) PeekStringByPath(path ...any) (string, error) + func (r *Response) Size() int + func (r *Response) WriteTo(w io.Writer) (n int64, err error) v0.7.2 Oct 6, 2025 Changes in this version type Response + func (r *Response) Unmarshal(dst any) error v0.7.1 Oct 3, 2025 Changes in this version + const InvalidParams + const InvalidRequest + const MethodNotFound + const ParseError + const ServerSideException + func EncodeBatchRequest(reqs []*Request) ([]byte, error) + func EncodeBatchResponse(resps []*Response) ([]byte, error) + func RandomJSONRPCID() int64 + type Error struct + Code int + Data any + Message string + func (e *Error) Equals(other *Error) bool + func (e *Error) IsEmpty() bool + func (e *Error) String() string + func (e *Error) UnmarshalJSON(data []byte) error + func (e *Error) Validate() error + type Request struct + ID any + JSONRPC string + Method string + Params any + func DecodeBatchRequest(data []byte) ([]*Request, error) + func DecodeBatchRequestFromReader(r io.Reader, expectedSize int) ([]*Request, error) + func DecodeRequest(data []byte) (*Request, error) + func DecodeRequestOrBatch(data []byte) ([]*Request, bool, error) + func NewBatchNotification(methods []string, params []any) ([]*Request, error) + func NewBatchRequest(methods []string, params []any) ([]*Request, error) + func NewNotification(method string, params any) *Request + func NewRequest(method string, params any) *Request + func NewRequestWithID(method string, params any, id any) *Request + func RequestFromBytes(data []byte) (*Request, error) + func (r *Request) IDString() string + func (r *Request) IsEmpty() bool + func (r *Request) IsNotification() bool + func (r *Request) MarshalJSON() ([]byte, error) + func (r *Request) String() string + func (r *Request) UnmarshalJSON(data []byte) error + func (r *Request) UnmarshalParams(dst any) error + func (r *Request) Validate() error + type Response struct + func DecodeBatchResponse(data []byte) ([]*Response, error) + func DecodeBatchResponseFromReader(r io.Reader, expectedSize int) ([]*Response, error) + func DecodeResponse(data []byte) (*Response, error) + func DecodeResponseFromReader(r io.Reader, expectedSize int) (*Response, error) + func DecodeResponseOrBatch(data []byte) ([]*Response, bool, error) + func NewErrorResponse(id any, err *Error) *Response + func NewResponse(id any, result any) (*Response, error) + func NewResponseFromBytes(data []byte) (*Response, error) + func NewResponseFromRaw(id any, rawResult json.RawMessage) (*Response, error) + func NewResponseFromStream(body io.ReadCloser, expectedSize int) (*Response, error) + func (r *Response) Equals(other *Response) bool + func (r *Response) Err() *Error + func (r *Response) IDOrNil() any + func (r *Response) IDRaw() any + func (r *Response) IDString() string + func (r *Response) IsEmpty() bool + func (r *Response) MarshalJSON() ([]byte, error) + func (r *Response) RawResult() json.RawMessage + func (r *Response) String() string + func (r *Response) UnmarshalError() error + func (r *Response) UnmarshalJSON(data []byte) error + func (r *Response) UnmarshalResult(dst any) error + func (r *Response) Validate() error + func (r *Response) Version() string