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
{{ message }}
This repository was archived by the owner on Dec 15, 2025. It is now read-only.
Assuming jsoniter is supposed to be 100% compatible with encoding/json, it appears that jsoniter does not serialize map keys of custom types correctly, in that it does not use the MarshalText method when provided.
The standard behavior is that any type implementing the TextMarshaler interface should use MarshalText when marshaling itself.
The strange thing is that this incorrect behavior only happens when the map key is a value. When the map key is a pointer, it's fine.
To illustrate what I mean, consider these four scenarios: