I’m using Jason to store some maps in Postgresql. I much prefer the atom syntax for defining and accessing keys and I want to avoid half-string half-atom mixed style maps if possible.
I can see that Jason.decode has an option keys: :atoms, but I can’t for the life of me find anywhere to configure it as a default option with Phoenix/etc. I’ve tried looking around Jason, Ecto and Postgrex’s source.
I’m aware that atoms aren’t garbage collected but I’m not taking key names from users so I’m not worried about uncontrolled memory usage.
Hmm that’s a bummer. Do you think Ecto will shy away from letting you do it because of the potential for memory usage or spaces in keys, or is it considered bad practice in another way?