json.Unmarshal([]byte{}, &m) returns a bare io.ErrUnexpectedEOF, not a jsontext.SyntacticError.
This results in the v1 wrapper not converting the ErrUnexpectedEOF into the old-style error "unexpected end of JSON input", but I think the problem is in the v2 Unmarshal not returning the right error type here; it should consistently return a SyntacticError or SemanticError.
Comment From: neild
/cc @dsnet
Comment From: gabyhelp
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Comment From: gopherbot
Change https://go.dev/cl/687115 mentions this issue: encoding/json/v2: report wrapped io.ErrUnexpectedEOF