Reject trailing record JSON without decoding a second value
This commit is contained in:
@@ -493,6 +493,12 @@ changes to record selection are required.
|
||||
|
||||
## R12: Reject trailing JSON without constructing a discarded value — P3
|
||||
|
||||
**Completed:** Loading uses complete-document unmarshalling and wraps the actual
|
||||
parser error. It avoids constructing a discarded trailing value while retaining
|
||||
the whole-file read bound. Tests passed for single documents, whitespace,
|
||||
additional fields, extra documents, malformed suffixes, and retained syntax
|
||||
causes, alongside byte-preserving record regressions.
|
||||
|
||||
**Relevant code:** `internal/publish/record.go:24`, particularly the second
|
||||
`decoder.Decode(&trailing)` and its error handling at lines 34–37.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user