diff options
Diffstat (limited to 'src/encoding/json')
| -rw-r--r-- | src/encoding/json/v2/arshal_funcs.go | 11 | ||||
| -rw-r--r-- | src/encoding/json/v2/example_test.go | 1 |
2 files changed, 1 insertions, 11 deletions
diff --git a/src/encoding/json/v2/arshal_funcs.go b/src/encoding/json/v2/arshal_funcs.go index 1c325b16cb..860ff0b0f2 100644 --- a/src/encoding/json/v2/arshal_funcs.go +++ b/src/encoding/json/v2/arshal_funcs.go @@ -19,17 +19,6 @@ import ( "encoding/json/jsontext" ) -// SkipFunc may be returned by [MarshalToFunc] and [UnmarshalFromFunc] functions. -// -// Any function that returns SkipFunc must not cause observable side effects -// on the provided [jsontext.Encoder] or [jsontext.Decoder]. -// For example, it is permissible to call [jsontext.Decoder.PeekKind], -// but not permissible to call [jsontext.Decoder.ReadToken] or -// [jsontext.Encoder.WriteToken] since such methods mutate the state. -// -// Deprecated: Use [errors.ErrUnsupported] instead. -var SkipFunc = errors.ErrUnsupported - var errUnsupportedMutation = errors.New("unsupported calls must not read or write any tokens") var errNonSingularValue = errors.New("must read or write exactly one value") diff --git a/src/encoding/json/v2/example_test.go b/src/encoding/json/v2/example_test.go index b95ad0f73c..f8b42ce3de 100644 --- a/src/encoding/json/v2/example_test.go +++ b/src/encoding/json/v2/example_test.go @@ -8,6 +8,7 @@ package json_test import ( "bytes" + "errors" "fmt" "log" "math" |
