Phoenix.Jiffy

JSON Engine replacement for Phoenix. Mimics default JSON engine (Poison), but uses Jiffy under the hood.

Installation

If available in Hex, the package can be installed as:

  1. Add phoenix_jiffy to your list of dependencies in mix.exs:
```elixir
def deps do
  [{:phoenix_jiffy, "~> 0.1.0"}]
end
```
  1. Ensure phoenix_jiffy is started before your application:
```elixir
def application do
  [applications: [:phoenix_jiffy]]
end
```
  1. Add to config/config.exs:
```elixir
config :phoenix, :format_encoders,
  json: Phoenix.Jiffy
```
  1. Change your endpoint.ex:
```elixir
defmodule MyApp.Endpoint do
  use Phoenix.Endpoint, otp_app: :my_app

  ...

  plug Plug.Parsers,
    parsers: [:urlencoded, :multipart, :json],
    pass: ["*/*"],
    json_decoder: Phoenix.Jiffy

  ...

end
```