2021-09-22 02:05:09 +03:00
|
|
|
package json
|
|
|
|
|
|
|
|
import (
|
2021-10-03 18:43:19 +03:00
|
|
|
codec "go.unistack.org/micro/v3/codec"
|
2021-09-22 02:05:09 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
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)
|
|
|
|
}
|