Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(8557)

Issue 6943047: code review 6943047: encoding/json: encode map key is of string kind, decode... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by ryanslade
Modified:
11 years, 3 months ago
Reviewers:
CC:
rsc, dfc, golang-dev
Visibility:
Public.

Description

encoding/json: encode map key is of string kind, decode only of string type Allows encoding and decoding of maps with key of string kind, not just string type. Fixes issue 3519.

Patch Set 1 #

Patch Set 2 : diff -r ac06fe42df6d https://code.google.com/p/go/ #

Patch Set 3 : diff -r ac06fe42df6d https://code.google.com/p/go/ #

Patch Set 4 : diff -r 98187cf442ac https://code.google.com/p/go/ #

Total comments: 5

Patch Set 5 : diff -r b7482cb67996 https://code.google.com/p/go/ #

Patch Set 6 : diff -r a298f2d529ec https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -3 lines) Patch
M src/pkg/encoding/json/decode.go View 1 2 3 4 5 2 chunks +5 lines, -3 lines 0 comments Download
M src/pkg/encoding/json/decode_test.go View 1 2 3 4 1 chunk +25 lines, -0 lines 0 comments Download

Messages

Total messages: 10
ryanslade
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
11 years, 4 months ago (2012-12-13 17:21:16 UTC) #1
ryanslade
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 4 months ago (2012-12-13 20:59:08 UTC) #2
rsc
Thanks for working on this. https://codereview.appspot.com/6943047/diff/7001/src/pkg/encoding/json/decode.go File src/pkg/encoding/json/decode.go (right): https://codereview.appspot.com/6943047/diff/7001/src/pkg/encoding/json/decode.go#newcode441 src/pkg/encoding/json/decode.go:441: if t.Key().Kind() != reflect.TypeOf("").Kind() ...
11 years, 4 months ago (2012-12-13 21:24:30 UTC) #3
ryanslade
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 4 months ago (2012-12-13 22:15:49 UTC) #4
ryanslade
I've made the changes as suggested, thanks for taking a look. https://codereview.appspot.com/6943047/diff/7001/src/pkg/encoding/json/decode.go File src/pkg/encoding/json/decode.go (right): ...
11 years, 4 months ago (2012-12-13 22:20:40 UTC) #5
rsc
LGTM
11 years, 4 months ago (2012-12-17 15:57:46 UTC) #6
rsc
Sorry but it looks like someone else made some conflicting changes. Please hg sync, resolve ...
11 years, 4 months ago (2012-12-17 15:59:14 UTC) #7
dfc
@ryanslade, something like this should work against +tip diff -r 7fe729534c6d src/pkg/encoding/json/decode.go --- a/src/pkg/encoding/json/decode.go Fri ...
11 years, 4 months ago (2012-12-21 05:12:08 UTC) #8
ryanslade
Hello rsc@golang.org, dave@cheney.net (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 3 months ago (2012-12-24 18:08:44 UTC) #9
dfc
11 years, 3 months ago (2012-12-30 04:41:02 UTC) #10
*** Submitted as https://code.google.com/p/go/source/detail?r=7b6096868871 ***

encoding/json: encode map key is of string kind, decode only of string type

Allows encoding and decoding of maps with key of string kind, not just string
type.
Fixes issue 3519.

R=rsc, dave
CC=golang-dev
https://codereview.appspot.com/6943047

Committer: Dave Cheney <dave@cheney.net>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b