You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When decoding JSON, sometimes you just want to inform the users about problems in the serialized content, rather than returning an error or staying silent. I realize that the Attachment field of https://pkg.go.dev/github.com/json-iterator/go#Iterator could be used for this purpose (thanks for adding that in advance!) by a custom warning-supporting decoder, but it would be nice to add this field specifically for this purpose, so it could be re-used more generally.
The two main uses I see for it would be to warn instead of error when there are duplicate or unknown fields when decoding.
I can make a PR with this change if accepted. Would you be open to this?
The text was updated successfully, but these errors were encountered:
Hi! Thanks for this great project 🥇 💯
When decoding JSON, sometimes you just want to inform the users about problems in the serialized content, rather than returning an error or staying silent. I realize that the
Attachment
field of https://pkg.go.dev/github.com/json-iterator/go#Iterator could be used for this purpose (thanks for adding that in advance!) by a custom warning-supporting decoder, but it would be nice to add this field specifically for this purpose, so it could be re-used more generally.The two main uses I see for it would be to warn instead of error when there are duplicate or unknown fields when decoding.
I can make a PR with this change if accepted. Would you be open to this?
The text was updated successfully, but these errors were encountered: