JaSerializer.Deserializer
This plug “deserializes” params to underscores.
For example these params:
%{
"data" => %{
"attributes" => %{
"foo-bar" => true
}
}
}
are transformed to:
%{
"data" => %{
"attributes" => %{
"foo_bar" => true
}
}
}
Usage
Just include in your plug stack after a json parser:
plug Plug.Parsers, parsers: [:json], json_decoder: Poison
plug JaSerializer.Deserializer
Summary
| call(conn, opts) | Callback implementation for |
| do_deep_format_keys(map) | |
| do_format_resource(resource) | |
| format_key(key) | |
| init(opts) | Callback implementation for |
Functions
Callback implementation for c:Plug.call/2.
Callback implementation for c:Plug.init/1.