ja_serializer v0.18.1 JaSerializer.Deserializer View Source
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
Link to this section Summary
Link to this section Functions
Callback implementation for Plug.call/2
.
Callback implementation for Plug.init/1
.