{"modulePath":"github.com/omalloc/tavern","version":"v1.2.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package encoding\n\n## Functions\n\n```go\nfunc Marshal(v any) ([]byte, error)\n```\n\n```go\nfunc Name() string\n```\n\n```go\nfunc SetDefaultCodec(codec Codec)\n```\nSetDefaultCodec sets the default codec.\n\n```go\nfunc Unmarshal(data []byte, v any) error\n```\n\n## Types\n\n```go\ntype Codec interface {\n\t// Marshal returns the wire format of v.\n\tMarshal(v any) ([]byte, error)\n\t// Unmarshal parses the wire format into v.\n\tUnmarshal(data []byte, v any) error\n\t// Name returns the name of the Codec implementation. The returned string\n\t// will be used as part of content type in transmission.  The result must be\n\t// static; the result cannot change between calls.\n\tName() string\n}\n```\nCodec defines the interface gRPC uses to encode and decode messages.  Note that implementations of this interface must be thread safe; a Codec's methods can be called from concurrent goroutines.\n\n```go\nfunc GetDefaultCodec() Codec\n```\n\n","path":"github.com/omalloc/tavern/pkg/encoding","name":"encoding","synopsis":"","isRedistributable":true}
