1
0
mirror of https://github.com/json-iterator/go.git synced 2024-11-24 08:22:14 +02:00

add tests for #283

This commit is contained in:
Tao Wen 2018-07-01 13:05:25 +08:00
parent 8744d7c5c7
commit 720ab8dc7f
5 changed files with 13 additions and 7 deletions

6
Gopkg.lock generated
View File

@ -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

View File

@ -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"

View File

@ -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
}

View File

@ -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 {