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

Issue 11642043: encoding/{json,xml}: handle omitempty for zero-value st... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by cookieo9
Modified:
10 years, 9 months ago
Reviewers:
Visibility:
Public.

Description

encoding/{json,xml}: handle omitempty for zero-value structs (Incomplete) The omitempty flag now supports omitting an entire struct from the output if its memory is all zeros. Fixes issue 4357. Todo: encoding/xml.TestMarshal test #72 breaks with the new behaviour (it expected the old behaviour). If the new behaviour is desired (and doesn't violate the compatibility promise), then the test needs to be fixed. Also new tests should be added to encoding/xml to match the new tests in encoding/json.

Patch Set 1 #

Patch Set 2 : diff -r ee11148d2255 http://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -2 lines) Patch
M src/pkg/encoding/json/encode.go View 1 2 chunks +3 lines, -1 line 0 comments Download
M src/pkg/encoding/json/encode_test.go View 1 2 chunks +18 lines, -1 line 0 comments Download
M src/pkg/encoding/xml/marshal.go View 1 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 1
cookieo9
10 years, 9 months ago (2013-07-22 08:46:42 UTC) #1
*** Abandoned ***
Sign in to reply to this message.

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