diff --git a/Gopkg.lock b/Gopkg.lock index 338f1c6..c8a9fbb 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -10,12 +10,12 @@ [[projects]] name = "github.com/modern-go/reflect2" packages = ["."] - revision = "1df9eeb2bb81f327b96228865c5687bc2194af3f" - version = "1.0.0" + revision = "4b7aa43c6742a2c18fdef89dd197aaae7dac7ccd" + version = "1.0.1" [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "ac7003b5a981716353a43055ab7d4c5357403cb30a60de2dbdeb446c1544beaa" + inputs-digest = "ea54a775e5a354cb015502d2e7aa4b74230fc77e894f34a838b268c25ec8eeb8" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index 5801ffa..313a0f8 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -23,4 +23,4 @@ ignored = ["github.com/davecgh/go-spew*","github.com/google/gofuzz*","github.com [[constraint]] name = "github.com/modern-go/reflect2" - version = "1.0.0" + version = "1.0.1" diff --git a/api_tests/decoder_test.go b/api_tests/decoder_test.go index 8e1c160..e325ef3 100644 --- a/api_tests/decoder_test.go +++ b/api_tests/decoder_test.go @@ -61,4 +61,4 @@ func Test_decoder_more(t *testing.T) { should := require.New(t) decoder := jsoniter.NewDecoder(bytes.NewBufferString("abcde")) should.True(decoder.More()) -} \ No newline at end of file +} diff --git a/extra/privat_fields.go b/extra/privat_fields.go index 0cfd549..cbebe5c 100644 --- a/extra/privat_fields.go +++ b/extra/privat_fields.go @@ -2,8 +2,8 @@ package extra import ( "github.com/json-iterator/go" - "unicode" "strings" + "unicode" ) // SupportPrivateFields include private fields when encoding/decoding @@ -52,4 +52,3 @@ func calcFieldNames(originalFieldName string, tagProvidedFieldName string, whole } return fieldNames } - diff --git a/value_tests/struct_test.go b/value_tests/struct_test.go index 067ad22..10ace5c 100644 --- a/value_tests/struct_test.go +++ b/value_tests/struct_test.go @@ -93,6 +93,13 @@ func init() { T float64 `json:"t"` })(nil), input: `{"T":10.0}`, + }, unmarshalCase{ + ptr: (*struct { + KeyString string `json:"key_string"` + Type string `json:"type"` + Asks [][2]float64 `json:"asks"` + })(nil), + input: `{"key_string": "KEYSTRING","type": "TYPE","asks": [[1e+66,1]]}`, }) marshalCases = append(marshalCases, struct {