Versions in this module Expand all Collapse all v0 v0.5.1 Sep 2, 2019 v0.5.0 Sep 1, 2019 Changes in this version + var DefaultTypeAdapters = []Adapter + var JSONMarshaler = new(jsonMarshaler) + func WithMarshalUnmarshaler(marshaler MarshalUnmarshaler) func(c *Codec) error + func WithTypeAdapters(typeAdapters []Adapter) func(c *Codec) error + func WithTypeSep(sep string) func(c *Codec) error + type Adapter interface + FromString func(s string) (interface{}, error) + MarshalText func() (text []byte, err error) + Type func() reflect.Type + Wrap func(v interface{}) Adapter + func NewAdapter(target interface{}, fromString func(s string) (interface{}, error), ...) Adapter + type Codec struct + func New(opts ...Option) (*Codec, error) + func (c *Codec) Marshal(v interface{}) ([]byte, error) + func (c *Codec) Unmarshal(data []byte, v interface{}) error + type MarshalUnmarshaler interface + Marshal func(v interface{}) ([]byte, error) + Unmarshal func(b []byte, v interface{}) error + type Option func(c *Codec) error