toml
toml copied to clipboard
support char as map key
When attempting to use an untagged enum over a char
as a map key while serializing to TOML I see this error: map key was not a string
.
Writing my own serializer which uses char::encode_utf8
lets me work around this, but I think TOML should directly support a char
as a map key?
Presumably this is just a little code in KeySerializer
's fn serialize_char
, maybe also the deserializer.
The approach I've been taking is that we do whatever serde_json
does.
Please follow the pattern in #586 by including a complete reproduction case that contrasts toml
s behavior with serde_json
.