Hooking Readers and Writers directly up to Decode and Encode is a very
simple solution to a lot of problems but as I’ve come to discover, it
doesn’t cover corner cases. You may need to Marshal/Unmarshal as an
intervening step to cover such corner cases. For example, there are times
when you may need to make minor changes to the data in-flight for protocol
compliance reasons. encoder/xml and XMPP come to mind as a good example
and in fact I was talking about this very issue just yesterday.
Best,
Daniel