Descriptionencoding/{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 #
MessagesTotal messages: 1
|