You've already forked json-iterator
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:
@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user