Packages

Ecto.JSON makes Ecto able to use any type of data (Integer, String, List, Map, etc.) which is valid JSON, not only key-value maps.

Current section

Files

Jump to
ecto_json lib ecto json.ex
Raw

lib/ecto/json.ex

defmodule Ecto.JSON do
@moduledoc File.read!("README.md")
use Ecto.Type
def type do
:json
end
def cast(data) do
{:ok, data}
end
def load(data) do
{:ok, data}
end
def dump(data) do
{:ok, data}
end
end