elixir-plug / plug

Compose web applications with functions
https://hex.pm/packages/plug
Other
2.85k stars 582 forks source link

Add example of passing :json_decoder as an MFA #1069

Closed adamu closed 2 years ago

adamu commented 2 years ago

A few times, most recently on the Elixir Forum, I've wanted to customise the behaviour of the JSON parser. It's not immediately obvious from the docs how to do this, so I've added an example to the Plug.Parsers docs (the last sentence and code block).

image
josevalim commented 2 years ago

:green_heart: :blue_heart: :purple_heart: :yellow_heart: :heart: