Skip to content

Commit a3e013b

Browse files
committed
encoding/json: use Deprecated markers
In #10909, it was decided that "Deprecated:" is a magic string for tools (e.g., #17056 for godoc) to detect deprecated identifiers. Use those convention instead of custom written prose. Change-Id: Ia514fc3c88fc502e86c6e3de361c435f4cb80b22 Reviewed-on: https://go-review.googlesource.com/70110 Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Joe Tsai <[email protected]>
1 parent edcf2d0 commit a3e013b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/encoding/json/decode.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ func (e *UnmarshalTypeError) Error() string {
138138

139139
// An UnmarshalFieldError describes a JSON object key that
140140
// led to an unexported (and therefore unwritable) struct field.
141-
// (No longer used; kept for compatibility.)
141+
//
142+
// Deprecated: No longer used; kept for compatibility.
142143
type UnmarshalFieldError struct {
143144
Key string
144145
Type reflect.Type

src/encoding/json/encode.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ func (e *UnsupportedValueError) Error() string {
245245
// attempting to encode a string value with invalid UTF-8 sequences.
246246
// As of Go 1.2, Marshal instead coerces the string to valid UTF-8 by
247247
// replacing invalid bytes with the Unicode replacement rune U+FFFD.
248-
// This error is no longer generated but is kept for backwards compatibility
249-
// with programs that might mention it.
248+
//
249+
// Deprecated: No longer used; kept for compatibility.
250250
type InvalidUTF8Error struct {
251251
S string // the whole string value that caused the error
252252
}

0 commit comments

Comments
 (0)