• Rob Pike's avatar
    encoding/json: fix handling of anonymous fields · 357e37dc
    Rob Pike authored
    The old code was incorrect and also broken. It passed the tests by accident.
    The new algorithm is:
            1) Sort the fields in order of names.
            2) For all fields with the same name, sort in increasing depth.
            3) Choose the single field with shortest depth.
    If any of the fields of a given name has a tag, do the above using
    tagged fields of that name only.
    Fixes #5245.
    
    R=iant
    CC=golang-dev
    https://golang.org/cl/8583044
    357e37dc
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...