-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Hi,
I am using elixir-mongodb which relies on this lib, now by default this returns maps with atom keys, I however would like it to return maps with string keys. So I added the following configuration:
config :bson,
decoder_new_doc: &Bson.Decoder.elist_to_map/1
In the console I can check that it is loaded correctly:
iex(3)> Application.get_env(:bson, :decoder_new_doc, &Bson.Decoder.elist_to_atom_map/1)
&Bson.Decoder.elist_to_map/1
But when I execute the following I still get atom keys:
iex(4)> [{"a", 1}, {"b", 2}] |> Bson.encode |> Bson.decode
%{a: 1, b: 2}
From looking at the code I should be doing what I am doing, but obviously I am doing something wrong.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels