1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-12 22:47:42 +02:00

when embedded ptr is nil, the fields should be omitted

This commit is contained in:
Tao Wen
2018-02-16 17:32:41 +08:00
parent a7a34507ab
commit 9dafbc667f
6 changed files with 66 additions and 50 deletions

View File

@ -92,7 +92,8 @@ func init() {
}{&StructVarious{}},
struct {
*StructVarious
}{},
Field int
}{nil, 10},
struct {
Field1 int
Field2 [1]*float64
@ -172,7 +173,6 @@ type CacheItem struct {
MaxAge int `json:"cacheAge"`
}
type orderA struct {
Field2 string
}
@ -193,4 +193,4 @@ type structOrder struct {
Field3 string
orderB
Field7 string
}
}