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

Issue 5029043: code review 5029043: [release-branch.r60] json: fix decode bug with struct t... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 7 months ago by adg
Modified:
12 years, 7 months ago
Reviewers:
CC:
dsymonds, golang-dev
Visibility:
Public.

Description

[release-branch.r60] json: fix decode bug with struct tag names with ,opts being ignored ««« CL 4965049 / f8e4df3c4048 json: fix decode bug with struct tag names with ,opts being ignored When the encoder was updated to respect the ",omitempty" struct tag options, the decoder half was never updated to know about the new struct tag format. (the format is now an optional name, followed by zero or more ",option" strings) This only affected people who used ",omitempty" along with a field name. In that case, the serialized JSON wouldn't decode to the original value. R=golang-dev, dvyukov CC=golang-dev http://codereview.appspot.com/4965049 »»»

Patch Set 1 #

Patch Set 2 : diff -r de13d477b43f https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r de13d477b43f https://go.googlecode.com/hg/ #

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

Messages

Total messages: 3
adg
Hello dsymonds (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 7 months ago (2011-09-19 01:42:10 UTC) #1
dsymonds
LGTM
12 years, 7 months ago (2011-09-19 01:44:30 UTC) #2
adg
12 years, 7 months ago (2011-09-19 01:54:37 UTC) #3
*** Submitted as http://code.google.com/p/go/source/detail?r=d5e97874fe84 ***

[release-branch.r60] json: fix decode bug with struct tag names with ,opts being
ignored

««« CL 4965049 / f8e4df3c4048
json: fix decode bug with struct tag names with ,opts being ignored

When the encoder was updated to respect the ",omitempty"
struct tag options, the decoder half was never updated to know
about the new struct tag format. (the format is now an optional
name, followed by zero or more ",option" strings)

This only affected people who used ",omitempty" along with
a field name. In that case, the serialized JSON wouldn't
decode to the original value.

R=golang-dev, dvyukov
CC=golang-dev
http://codereview.appspot.com/4965049
»»»

R=dsymonds
CC=golang-dev
http://codereview.appspot.com/5029043
Sign in to reply to this message.

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