]> Cypherpunks repositories - gostls13.git/commit
encoding/json: different decision on tags and shadowing
authorRob Pike <r@golang.org>
Wed, 10 Apr 2013 20:05:34 +0000 (13:05 -0700)
committerRob Pike <r@golang.org>
Wed, 10 Apr 2013 20:05:34 +0000 (13:05 -0700)
commit5fd708c000e50bac6091662c53c79a469a43071a
treedf68b14628d8009a7a7f44e216bdaf1bca2bc009
parentf0fc16abd7bf346515d45ba2885bde45bafb8321
encoding/json: different decision on tags and shadowing
If there are no tags, the rules are the same as before.
If there is a tagged field, choose it if there is exactly one
at the top level of all fields.
More tests. The old tests were clearly inadequate, since
they all pass as is. The new tests only work with the new code.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/8617044
src/pkg/encoding/json/encode.go
src/pkg/encoding/json/encode_test.go