You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-06-24 23:16:47 +02:00
#53 extract out config
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
package jsoniter
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/json-iterator/go/require"
|
||||
"testing"
|
||||
"unsafe"
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
func Test_write_array_of_interface(t *testing.T) {
|
||||
@ -140,10 +140,9 @@ func Test_encode_object_contain_non_empty_interface(t *testing.T) {
|
||||
should.Equal(`{"Field":"hello"}`, str)
|
||||
}
|
||||
|
||||
|
||||
func Test_nil_non_empty_interface(t *testing.T) {
|
||||
CleanEncoders()
|
||||
CleanDecoders()
|
||||
DEFAULT_CONFIG.CleanEncoders()
|
||||
DEFAULT_CONFIG.CleanDecoders()
|
||||
type TestObject struct {
|
||||
Field []MyInterface
|
||||
}
|
||||
@ -152,4 +151,4 @@ func Test_nil_non_empty_interface(t *testing.T) {
|
||||
b := []byte(`{"Field":["AAA"]}`)
|
||||
should.NotNil(json.Unmarshal(b, &obj))
|
||||
should.NotNil(Unmarshal(b, &obj))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user