mirror of
https://github.com/json-iterator/go.git
synced 2025-06-06 22:36:25 +02:00
Merge pull request #408 from onelrdm/master
skip - tag before spliting parts
This commit is contained in:
commit
908eaed151
@ -341,10 +341,10 @@ func describeStruct(ctx *ctx, typ reflect2.Type) *StructDescriptor {
|
|||||||
if ctx.onlyTaggedField && !hastag && !field.Anonymous() {
|
if ctx.onlyTaggedField && !hastag && !field.Anonymous() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
tagParts := strings.Split(tag, ",")
|
|
||||||
if tag == "-" {
|
if tag == "-" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
tagParts := strings.Split(tag, ",")
|
||||||
if field.Anonymous() && (tag == "" || tagParts[0] == "") {
|
if field.Anonymous() && (tag == "" || tagParts[0] == "") {
|
||||||
if field.Type().Kind() == reflect.Struct {
|
if field.Type().Kind() == reflect.Struct {
|
||||||
structDescriptor := describeStruct(ctx, field.Type())
|
structDescriptor := describeStruct(ctx, field.Type())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user