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

Issue 4709044: code review 4709044: json: add omitzero struct tag option (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 5 months ago by bradfitz
Modified:
14 years, 5 months ago
Reviewers:
CC:
rsc, dsymonds, r2, r, golang-dev
Visibility:
Public.

Description

json: add omitempty struct tag option Fixes issue 2032

Patch Set 1 #

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

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

Patch Set 4 : diff -r e09ea45b361e https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r e09ea45b361e https://go.googlecode.com/hg/ #

Total comments: 5

Patch Set 6 : diff -r e09ea45b361e https://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 7 : diff -r 6f159e7a196e https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+105 lines, -13 lines) Patch
M src/pkg/json/encode.go View 1 2 3 4 5 6 4 chunks +61 lines, -13 lines 0 comments Download
A src/pkg/json/encode_test.go View 1 2 3 4 5 1 chunk +44 lines, -0 lines 0 comments Download

Messages

Total messages: 15
bradfitz
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
14 years, 5 months ago (2011-07-13 02:40:18 UTC) #1
dsymonds
This makes me a little uneasy. How often is this going to come up in ...
14 years, 5 months ago (2011-07-13 02:56:00 UTC) #2
r2
This is unpleasant and also precedent-setting, a bad combination. -rob
14 years, 5 months ago (2011-07-13 05:16:22 UTC) #3
rsc
On Wed, Jul 13, 2011 at 01:16, Rob 'Commander' Pike <r@google.com> wrote: > This is ...
14 years, 5 months ago (2011-07-13 05:19:40 UTC) #4
r2
On 13/07/2011, at 3:19 PM, Russ Cox wrote: > On Wed, Jul 13, 2011 at ...
14 years, 5 months ago (2011-07-13 05:23:07 UTC) #5
rsc
okay. i'll circle back with brad tomorrow and suggest another way.
14 years, 5 months ago (2011-07-13 05:24:23 UTC) #6
bradfitz
Hello rsc@golang.org, dsymonds@golang.org, r@google.com (cc: golang-dev@googlegroups.com), Please take another look.
14 years, 5 months ago (2011-07-14 01:06:15 UTC) #7
bradfitz
Hello rsc@golang.org, dsymonds@golang.org, r@google.com (cc: golang-dev@googlegroups.com), Please take another look.
14 years, 5 months ago (2011-07-14 01:11:08 UTC) #8
dsymonds
I'm personally much happier with that.
14 years, 5 months ago (2011-07-14 01:11:23 UTC) #9
rsc
looks pretty good http://codereview.appspot.com/4709044/diff/11002/src/pkg/json/encode.go File src/pkg/json/encode.go (right): http://codereview.appspot.com/4709044/diff/11002/src/pkg/json/encode.go#newcode41 src/pkg/json/encode.go:41: // becomes a member of the ...
14 years, 5 months ago (2011-07-14 01:19:53 UTC) #10
bradfitz
omitempty makes it sounds like it's only for strings and lists. b := 0 // ...
14 years, 5 months ago (2011-07-14 01:32:35 UTC) #11
r
http://codereview.appspot.com/4709044/diff/11002/src/pkg/json/encode.go File src/pkg/json/encode.go (right): http://codereview.appspot.com/4709044/diff/11002/src/pkg/json/encode.go#newcode205 src/pkg/json/encode.go:205: return false maybe return true?
14 years, 5 months ago (2011-07-14 01:33:41 UTC) #12
bradfitz
Hello rsc@golang.org, dsymonds@golang.org, r@google.com, r@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
14 years, 5 months ago (2011-07-14 18:35:07 UTC) #13
rsc
LGTM http://codereview.appspot.com/4709044/diff/14001/src/pkg/json/encode.go File src/pkg/json/encode.go (right): http://codereview.appspot.com/4709044/diff/14001/src/pkg/json/encode.go#newcode42 src/pkg/json/encode.go:42: // specified and it has an empty or ...
14 years, 5 months ago (2011-07-14 18:38:30 UTC) #14
bradfitz
14 years, 5 months ago (2011-07-14 18:54:58 UTC) #15
*** Submitted as http://code.google.com/p/go/source/detail?r=fe1828189f20 ***

json: add omitempty struct tag option

Fixes issue 2032

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

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