summaryrefslogtreecommitdiff
path: root/decode.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-02-17 19:21:37 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-02-19 14:51:04 -0700
commit49ee8be679add0bd3cf08a2669331b3be7a835f8 (patch)
treeb3d3f889ed25084fe33ed9e01554d6ca51104bb5 /decode.go
parent00187950437a10952b82353405e5ba4b4515fb29 (diff)
compat/json: Correctly handle syntax-error-in-decode
Diffstat (limited to 'decode.go')
-rw-r--r--decode.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/decode.go b/decode.go
index 491971a..a136668 100644
--- a/decode.go
+++ b/decode.go
@@ -53,6 +53,8 @@ import (
// or another is encountered; if it does not, then the parent Decode
// call will return a *DecodeTypeError.
//
+// DecodeJSON should return nil (not io.EOF) on success.
+//
// Implementor's note: "withLimitingScanner" is the thing to search
// for in decode.go if you want to read up on that io.RuneScanner.
type Decodable interface {