fix codec.Frame in case of flatten struct tag
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
17
json/options.go
Normal file
17
json/options.go
Normal file
@@ -0,0 +1,17 @@
|
||||
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)
|
||||
}
|
Reference in New Issue
Block a user