Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
b19b8813b6 | |||
0476b2dd5c |
@@ -28,7 +28,7 @@ func TestFrameFlatten(t *testing.T) {
|
||||
Name: &codec.Frame{Data: []byte("test")},
|
||||
}
|
||||
|
||||
buf, err := NewCodec().Marshal(s)
|
||||
buf, err := NewCodec(codec.Flatten(true)).Marshal(s)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
@@ -20,8 +20,8 @@ var (
|
||||
)
|
||||
|
||||
var (
|
||||
_ codec.Codec = (*jsonCodec)()
|
||||
_ codec.CodecV2 = (*jsonCodecV2)()
|
||||
_ codec.Codec = (*jsonCodec)(nil)
|
||||
_ codec.CodecV2 = (*jsonCodecV2)(nil)
|
||||
)
|
||||
|
||||
type JsonMarshalOptions struct {
|
||||
@@ -258,3 +258,7 @@ func (c *jsonCodecV2) String() string {
|
||||
func NewCodec(opts ...codec.Option) *jsonCodec {
|
||||
return &jsonCodec{opts: codec.NewOptions(opts...)}
|
||||
}
|
||||
|
||||
func NewCodecV2(opts ...codec.Option) *jsonCodecV2 {
|
||||
return &jsonCodecV2{opts: codec.NewOptions(opts...)}
|
||||
}
|
||||
|
Reference in New Issue
Block a user