micro-codec-segmentio/json/options.go
Vasiliy Tolstov 3895c6b703 fix codec.Frame in case of flatten struct tag
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-09-24 00:45:52 +03:00

18 lines
363 B
Go

package json
import (
codec "github.com/unistack-org/micro/v3/codec"
)
type unmarshalOptionsKey struct{}
func UnmarshalOptions(o JsonUnmarshalOptions) codec.Option {
return codec.SetOption(unmarshalOptionsKey{}, o)
}
type marshalOptionsKey struct{}
func MarshalOptions(o JsonMarshalOptions) codec.Option {
return codec.SetOption(marshalOptionsKey{}, o)
}