1
0
mirror of https://github.com/json-iterator/go.git synced 2025-04-23 11:37:32 +02:00
This commit is contained in:
Tao Wen 2017-06-29 20:40:07 +08:00
parent 09cb1d9236
commit fb382c0ec1

View File

@ -238,7 +238,7 @@ func describeStruct(cfg *frozenConfig, typ reflect.Type) (*StructDescriptor, err
}
}
tagParts := strings.Split(field.Tag.Get("json"), ",")
fieldNames := calcFieldNames(field.Name, tagParts[0], string(field.Tag))
fieldNames := calcFieldNames(field.Name, tagParts[0], string(field.Tag.Get("json")))
fieldCacheKey := fmt.Sprintf("%s/%s", typ.String(), field.Name)
decoder := fieldDecoders[fieldCacheKey]
if decoder == nil {