diff --git a/src/encoding/json/decode.go b/src/encoding/json/decode.go index bc3bd9733d3f54..44f903535896fa 100644 --- a/src/encoding/json/decode.go +++ b/src/encoding/json/decode.go @@ -138,7 +138,8 @@ func (e *UnmarshalTypeError) Error() string { // An UnmarshalFieldError describes a JSON object key that // led to an unexported (and therefore unwritable) struct field. -// (No longer used; kept for compatibility.) +// +// Deprecated: No longer used; kept for compatibility. type UnmarshalFieldError struct { Key string Type reflect.Type diff --git a/src/encoding/json/encode.go b/src/encoding/json/encode.go index d1dda9796af8b6..3f7a8d01751fe2 100644 --- a/src/encoding/json/encode.go +++ b/src/encoding/json/encode.go @@ -245,8 +245,8 @@ func (e *UnsupportedValueError) Error() string { // attempting to encode a string value with invalid UTF-8 sequences. // As of Go 1.2, Marshal instead coerces the string to valid UTF-8 by // replacing invalid bytes with the Unicode replacement rune U+FFFD. -// This error is no longer generated but is kept for backwards compatibility -// with programs that might mention it. +// +// Deprecated: No longer used; kept for compatibility. type InvalidUTF8Error struct { S string // the whole string value that caused the error }