Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(v *RawMessage) UnmarshalJSON(data []byte) does not make copy of data #380

Open
jackc opened this issue Dec 8, 2022 · 0 comments
Open

Comments

@jackc
Copy link

jackc commented Dec 8, 2022

See https://pkg.go.dev/encoding/json#Unmarshaler:

UnmarshalJSON must copy the JSON data if it wishes to retain the data after returning.

This appears to be the cause of a bug reported on pgx: jackc/pgx#1420

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant