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

Issue 6938068: code review 6938068: encoding/xml: Marshal ",any" fields

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 8 months ago by cjyar
Modified:
9 years, 7 months ago
Reviewers:
CC:
rsc, golang-dev, niemeyer
Visibility:
Public.

Description

encoding/xml: Marshal ",any" fields Fixes issue 3559. This makes Marshal handle fields marked ",any" instead of ignoring them. That makes Marshal more symmetrical with Unmarshal, which seems to have been a design goal. Note some test cases were changed, because this patch changes marshalling behavior. I think the previous behavior was buggy, but there's still a backward-compatibility question to consider.

Patch Set 1 #

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -11 lines) Patch
M src/pkg/encoding/xml/marshal.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/encoding/xml/marshal_test.go View 1 2 3 chunks +53 lines, -8 lines 0 comments Download
M src/pkg/encoding/xml/read.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/encoding/xml/typeinfo.go View 1 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 4
cjyar
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
9 years, 8 months ago (2012-12-16 04:19:56 UTC) #1
rsc
Please add a test with an AnyHolder and ",any,omitempty". That should behave like in your ...
9 years, 8 months ago (2012-12-17 15:04:03 UTC) #2
cjyar
Hello rsc@golang.org (cc: golang-dev@googlegroups.com, n13m3y3r@gmail.com), Please take another look.
9 years, 7 months ago (2012-12-18 05:15:15 UTC) #3
rsc
9 years, 7 months ago (2012-12-22 15:00:44 UTC) #4
*** Submitted as https://code.google.com/p/go/source/detail?r=7ea16cd2859c ***

encoding/xml: Marshal ",any" fields

Fixes issue 3559.

This makes Marshal handle fields marked ",any" instead of ignoring
them. That makes Marshal more symmetrical with Unmarshal, which seems
to have been a design goal.

Note some test cases were changed, because this patch changes
marshalling behavior. I think the previous behavior was buggy, but
there's still a backward-compatibility question to consider.

R=rsc
CC=golang-dev, n13m3y3r
https://codereview.appspot.com/6938068

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

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