When "stringifying" keys in a map, would you want to convert struct keys to strings?

Just looking for a little feedback on a tiny helper library I built -

Sometimes I find the need to convert maps with atom keys to maps with string keys, so %{:foo => 2} becomes %{"foo" => 2}…Has anyone ever come across the need to “string-ify” date/datetime/naivedatetime/structs when they are map keys? (I actually have yet to see a usecase where a date/struct is a map key, so I’m curious what others’ needs are as I’m making a little package with some helpers)…

If so, what would your ideal “stringification” of a struct/datetime/date/naivedatetime look like?

For example a %User{} struct could be stringified to:
"%User{age: 27, name: \"john\"}"

2 Likes