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

Fix/jsonbarray set json rawmessage #151

Merged
merged 2 commits into from
Mar 22, 2022

Conversation

EmilLaursen
Copy link
Contributor

Following jacks comment here, I added json.RawMessage to type_array_gen.sh.

This will fix the particular case of using .Set on sources of type []json.RawMessage. I added tests to confirm this.

However, it does not fix the fundamental issue in the sense that any other type alias for []byte can reproduce the errors. I suspect this is due to a bug in the default reflect based case of .Set.

Since json.RawMessage is a type in the standard library, and since the non-reflect cases are more efficient, I thought this little addition may still provide some value.

@jackc jackc merged commit 4c6f1b1 into jackc:master Mar 22, 2022
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

Successfully merging this pull request may close these issues.

2 participants