-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.FixPendingIssues that have a fix which has not yet been reviewed or submitted.Issues that have a fix which has not yet been reviewed or submitted.
Description
dec := json.NewDecoder(strings.NewReader(","))
fmt.Println(dec.More())
fmt.Println(dec.Token())$ go run .
true
<nil> invalid character ',' looking for beginning of value
$ GOEXPERIMENT=jsonv2 go run .
false
<nil> invalid character ',' looking for beginning of value
The JSONv1 implementation of More reports false if there is an error filling its buffer, but it reports true if the next token is semantically invalid. JSONv2 appears to report false if the next token is invalid.
Metadata
Metadata
Assignees
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.FixPendingIssues that have a fix which has not yet been reviewed or submitted.Issues that have a fix which has not yet been reviewed or submitted.
Type
Projects
Status
Done