FAQ
PTAL



http://codereview.appspot.com/6460044/diff/4001/src/pkg/encoding/json/decode.go
File src/pkg/encoding/json/decode.go (right):

http://codereview.appspot.com/6460044/diff/4001/src/pkg/encoding/json/decode.go#newcode504
src/pkg/encoding/json/decode.go:504: if strings.EqualFold(ff.name, key)
{
On 2012/08/31 21:26:45, niemeyer wrote:
This is now picking the last match rather than the first one. Is this ok? No
tests seem to cover this either.
Fixed and added test.

http://codereview.appspot.com/6460044/diff/4001/src/pkg/encoding/json/encode.go
File src/pkg/encoding/json/encode.go (right):

http://codereview.appspot.com/6460044/diff/4001/src/pkg/encoding/json/encode.go#newcode628
src/pkg/encoding/json/encode.go:628: if count[f.typ] > 1 {
On 2012/08/31 21:26:45, niemeyer wrote:
// Force a name collision.
Is that the idea? The index information is of course not correct for the
multiple fields, so it's a bit surprising on first sight.
It'd also be nice to have a test that breaks when this is commented
out. Right
now we can take all of the count logic out and tests still pass.
Done.

http://codereview.appspot.com/6460044/diff/4001/src/pkg/encoding/json/encode.go#newcode636
src/pkg/encoding/json/encode.go:636: if ft.Name() == "" {
On 2012/08/31 21:26:45, niemeyer wrote:
// Must be a pointer.
Done.

http://codereview.appspot.com/6460044/

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedSep 5, '12 at 3:22p
activeSep 11, '12 at 3:31a
posts3
users2
websitegolang.org

2 users in discussion

Rsc: 2 posts N13m3y3r: 1 post

People

Translate

site design / logo © 2022 Grokbase