Oasis.Controller.json

You're seeing just the function json, go back to Oasis.Controller module for more information.

Specs

json(Plug.Conn.t(), term()) :: Plug.Conn.t()

Sends JSON response.

It uses Jason to encode the input as an iodata data.

Examples

iex> json(conn, %{id: 1})