2021-09-22 02:05:09 +03:00
|
|
|
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{}
|
|
|
|
|
2021-09-22 02:10:09 +03:00
|
|
|
func MarshalOptions(o JsonMarshalOptions) codec.Option {
|
2021-09-22 02:05:09 +03:00
|
|
|
return codec.SetOption(marshalOptionsKey{}, o)
|
|
|
|
}
|