@@ -507,7 +507,7 @@ func (decoder *generalStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator)
507
507
for c = ',' ; c == ',' ; c = iter .nextToken () {
508
508
decoder .decodeOneField (ptr , iter )
509
509
}
510
- if iter .Error != nil && iter .Error != io .EOF {
510
+ if iter .Error != nil && iter .Error != io .EOF && len ( decoder . typ . Type1 (). Name ()) != 0 {
511
511
iter .Error = fmt .Errorf ("%v.%s" , decoder .typ , iter .Error .Error ())
512
512
}
513
513
if c != '}' {
@@ -588,7 +588,7 @@ func (decoder *oneFieldStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator)
588
588
break
589
589
}
590
590
}
591
- if iter .Error != nil && iter .Error != io .EOF {
591
+ if iter .Error != nil && iter .Error != io .EOF && len ( decoder . typ . Type1 (). Name ()) != 0 {
592
592
iter .Error = fmt .Errorf ("%v.%s" , decoder .typ , iter .Error .Error ())
593
593
}
594
594
iter .decrementDepth ()
@@ -622,7 +622,7 @@ func (decoder *twoFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator
622
622
break
623
623
}
624
624
}
625
- if iter .Error != nil && iter .Error != io .EOF {
625
+ if iter .Error != nil && iter .Error != io .EOF && len ( decoder . typ . Type1 (). Name ()) != 0 {
626
626
iter .Error = fmt .Errorf ("%v.%s" , decoder .typ , iter .Error .Error ())
627
627
}
628
628
iter .decrementDepth ()
@@ -660,7 +660,7 @@ func (decoder *threeFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterat
660
660
break
661
661
}
662
662
}
663
- if iter .Error != nil && iter .Error != io .EOF {
663
+ if iter .Error != nil && iter .Error != io .EOF && len ( decoder . typ . Type1 (). Name ()) != 0 {
664
664
iter .Error = fmt .Errorf ("%v.%s" , decoder .typ , iter .Error .Error ())
665
665
}
666
666
iter .decrementDepth ()
@@ -702,7 +702,7 @@ func (decoder *fourFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterato
702
702
break
703
703
}
704
704
}
705
- if iter .Error != nil && iter .Error != io .EOF {
705
+ if iter .Error != nil && iter .Error != io .EOF && len ( decoder . typ . Type1 (). Name ()) != 0 {
706
706
iter .Error = fmt .Errorf ("%v.%s" , decoder .typ , iter .Error .Error ())
707
707
}
708
708
iter .decrementDepth ()
@@ -748,7 +748,7 @@ func (decoder *fiveFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterato
748
748
break
749
749
}
750
750
}
751
- if iter .Error != nil && iter .Error != io .EOF {
751
+ if iter .Error != nil && iter .Error != io .EOF && len ( decoder . typ . Type1 (). Name ()) != 0 {
752
752
iter .Error = fmt .Errorf ("%v.%s" , decoder .typ , iter .Error .Error ())
753
753
}
754
754
iter .decrementDepth ()
@@ -798,7 +798,7 @@ func (decoder *sixFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator
798
798
break
799
799
}
800
800
}
801
- if iter .Error != nil && iter .Error != io .EOF {
801
+ if iter .Error != nil && iter .Error != io .EOF && len ( decoder . typ . Type1 (). Name ()) != 0 {
802
802
iter .Error = fmt .Errorf ("%v.%s" , decoder .typ , iter .Error .Error ())
803
803
}
804
804
iter .decrementDepth ()
@@ -852,7 +852,7 @@ func (decoder *sevenFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterat
852
852
break
853
853
}
854
854
}
855
- if iter .Error != nil && iter .Error != io .EOF {
855
+ if iter .Error != nil && iter .Error != io .EOF && len ( decoder . typ . Type1 (). Name ()) != 0 {
856
856
iter .Error = fmt .Errorf ("%v.%s" , decoder .typ , iter .Error .Error ())
857
857
}
858
858
iter .decrementDepth ()
@@ -910,7 +910,7 @@ func (decoder *eightFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterat
910
910
break
911
911
}
912
912
}
913
- if iter .Error != nil && iter .Error != io .EOF {
913
+ if iter .Error != nil && iter .Error != io .EOF && len ( decoder . typ . Type1 (). Name ()) != 0 {
914
914
iter .Error = fmt .Errorf ("%v.%s" , decoder .typ , iter .Error .Error ())
915
915
}
916
916
iter .decrementDepth ()
@@ -972,7 +972,7 @@ func (decoder *nineFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterato
972
972
break
973
973
}
974
974
}
975
- if iter .Error != nil && iter .Error != io .EOF {
975
+ if iter .Error != nil && iter .Error != io .EOF && len ( decoder . typ . Type1 (). Name ()) != 0 {
976
976
iter .Error = fmt .Errorf ("%v.%s" , decoder .typ , iter .Error .Error ())
977
977
}
978
978
iter .decrementDepth ()
@@ -1038,7 +1038,7 @@ func (decoder *tenFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator
1038
1038
break
1039
1039
}
1040
1040
}
1041
- if iter .Error != nil && iter .Error != io .EOF {
1041
+ if iter .Error != nil && iter .Error != io .EOF && len ( decoder . typ . Type1 (). Name ()) != 0 {
1042
1042
iter .Error = fmt .Errorf ("%v.%s" , decoder .typ , iter .Error .Error ())
1043
1043
}
1044
1044
iter .decrementDepth ()
0 commit comments