CL 19725 changed the encoding of typedByte to look for
typedByte.MarshalJSON and typedByte.MarshalText.
Previously it was handled like byte, producing a base64 encoding of the underlying byte data.
CL 19725 forgot to look for (*typedByte).MarshalJSON and (*typedByte).MarshalText,
as the marshaling of other slices would. Add test and fix for those.
This CL also adds tests that the decoder can handle both the old and new encodings.
(This was true even in Go 1.6, which is the only reason we can consider this
not an incompatible change.)
Reviewed-by: Ian Lance Taylor <email@example.com>
Run-TryBot: Russ Cox <firstname.lastname@example.org>
TryBot-Result: Gobot Gobot <email@example.com>
Reviewed-by: Andrew Gerrand <firstname.lastname@example.org>