-
Notifications
You must be signed in to change notification settings - Fork 18k
encoding/json: panic when encoding map[string]interface{}
#50970
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
Comments
Thank you for the bug report. However, this appears to be a panic stemming from |
@dsnet I can file a bug with them, but this is not reproducible with go 1.17, only with the 1.18 betas. |
|
The internal details of reflection map iteration changed from 1.17 to 1.18. This code is reaching into unstable runtime internals. That is always going to require careful attention when updating to a new version of Go. It would, in my opinion, be better to not do that. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Reproduces with latest beta.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I am trying to convert an apache arrow record to JSON. This same code works correctly in 1.17.3 but not in 1.18beta1 or 1.18beta2.
I have tried removing arrow and doing something similar to what
array.RecordToJSON
does, but was not able to reproduce that way. I wanted to report this anyway because it seems like a regression. Please let me know if I can provide more information.This is similar code not using arrow, in an attempt to reproduce, but it does not panic:
This is the code using arrow that panics:
What did you expect to see?
Exit 0
What did you see instead?
The text was updated successfully, but these errors were encountered: