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

Json Marshall encoder: Add ability to handle rune based keys (single char, fixed length, etc.) #4700

Open
novicearts opened this issue Jan 15, 2025 · 0 comments

Comments

@novicearts
Copy link

novicearts commented Jan 15, 2025

Is your feature request related to a problem? Please describe.
I'm currently working on a text/font app that requires potentially processing multiple languages, as such I opted to utilize runes as my map keys. For instance I have maps like:

character_table: map[rune][2]int
ligature_attrib_table: map[[2]rune] struct{...}

When I try to feed such structures through to the json.marshal function, I receive the Unsupported_Type error message. Upon looking at the source code, it seems like presently runes are not a supported key type for marshalling

Describe the solution you'd like
It seems like the main fix is to update the json marshal function to include support for rune types (and in general fixed arrays of simple data types if those aren't included, but that might be a separate issue).

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