2021-09-22 02:05:09 +03:00
|
|
|
package json
|
|
|
|
|
|
|
|
import (
|
2023-04-30 11:00:37 +03:00
|
|
|
codec "go.unistack.org/micro/v4/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)
|
|
|
|
}
|