diff options
| author | Lukas Joisten <luckuck.f95@gmail.com> | 2022-03-08 12:21:00 +0100 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-06-01 22:59:44 +0000 |
| commit | 46ab7a5c4f80d912f25b6b3e1044282a2a79df8b (patch) | |
| tree | 32634958571bcfc22f82506e64834fe0a2c72202 /src/encoding/json/decode.go | |
| parent | 293d43e17eaae8ccb83364e401538d51c035b8a4 (diff) | |
| download | go-46ab7a5c4f80d912f25b6b3e1044282a2a79df8b.tar.xz | |
encoding/json: mention SyntaxError in Unmarshal doc comment
Change-Id: I71c9d9ef9d21a7ae9466d8c7b283fdfbba01f5a8
Reviewed-on: https://go-review.googlesource.com/c/go/+/390734
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/encoding/json/decode.go')
| -rw-r--r-- | src/encoding/json/decode.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/encoding/json/decode.go b/src/encoding/json/decode.go index 4319918d1e..01af489b56 100644 --- a/src/encoding/json/decode.go +++ b/src/encoding/json/decode.go @@ -75,6 +75,8 @@ import ( // either be any string type, an integer, implement json.Unmarshaler, or // implement encoding.TextUnmarshaler. // +// If the JSON-encoded data contain a syntax error, Unmarshal returns a SyntaxError. +// // If a JSON value is not appropriate for a given target type, // or if a JSON number overflows the target type, Unmarshal // skips that field and completes the unmarshaling as best it can. |
