{"action":"created","issue":{"url":"https://api.github.com/repos/elixir-lang/ecto/issues/682","labels_url":"https://api.github.com/repos/elixir-lang/ecto/issues/682/labels{/name}","comments_url":"https://api.github.com/repos/elixir-lang/ecto/issues/682/comments","events_url":"https://api.github.com/repos/elixir-lang/ecto/issues/682/events","html_url":"https://github.com/elixir-lang/ecto/issues/682","id":90531316,"number":682,"title":"Can't get JSON extension to work","user":{"login":"fbjork","id":4585,"avatar_url":"https://avatars.githubusercontent.com/u/4585?v=3","gravatar_id":"","url":"https://api.github.com/users/fbjork","html_url":"https://github.com/fbjork","followers_url":"https://api.github.com/users/fbjork/followers","following_url":"https://api.github.com/users/fbjork/following{/other_user}","gists_url":"https://api.github.com/users/fbjork/gists{/gist_id}","starred_url":"https://api.github.com/users/fbjork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbjork/subscriptions","organizations_url":"https://api.github.com/users/fbjork/orgs","repos_url":"https://api.github.com/users/fbjork/repos","events_url":"https://api.github.com/users/fbjork/events{/privacy}","received_events_url":"https://api.github.com/users/fbjork/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-24T01:06:52Z","updated_at":"2015-06-24T16:47:55Z","closed_at":"2015-06-24T07:19:31Z","body":"Hi,\r\n\r\nI added the `extensions` line to the Repo config in `dev.exs` to enable the JSON extension:\r\n\r\n```elixir\r\nconfig :feed_service, FeedService.Repo,\r\n  adapter: Ecto.Adapters.Postgres,\r\n  username: \"postgres\",\r\n  password: \"postgres\",\r\n  database: \"feed_service_dev\",\r\n  size: 10, # The amount of database connections in the pool\r\n  extensions: [{Postgrex.Extensions.JSON, library: Poison}]\r\n```\r\n\r\nBut when I add a `:jsonb` field to my schema:\r\n\r\n```elixir\r\n  schema \"feeds\" do\r\n    field :name, :string\r\n    field :filters, :jsonb\r\n    timestamps\r\n  end\r\n```\r\n\r\nI get the following error:\r\n\r\n\r\n```elixir\r\n== Compilation error on file web/models/feed.ex ==\r\n** (ArgumentError) invalid or unknown type :jsonb for field :filters\r\n    lib/ecto/schema.ex:831: Ecto.Schema.check_type!/3\r\n    lib/ecto/schema.ex:665: Ecto.Schema.__field__/5\r\n    web/models/feed.ex:6: (module)\r\n    (stdlib) erl_eval.erl:657: :erl_eval.do_apply/6\r\n```\r\n\r\nAny ideas what I'm doing wrong?"},"comment":{"url":"https://api.github.com/repos/elixir-lang/ecto/issues/comments/114939079","html_url":"https://github.com/elixir-lang/ecto/issues/682#issuecomment-114939079","issue_url":"https://api.github.com/repos/elixir-lang/ecto/issues/682","id":114939079,"user":{"login":"fbjork","id":4585,"avatar_url":"https://avatars.githubusercontent.com/u/4585?v=3","gravatar_id":"","url":"https://api.github.com/users/fbjork","html_url":"https://github.com/fbjork","followers_url":"https://api.github.com/users/fbjork/followers","following_url":"https://api.github.com/users/fbjork/following{/other_user}","gists_url":"https://api.github.com/users/fbjork/gists{/gist_id}","starred_url":"https://api.github.com/users/fbjork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbjork/subscriptions","organizations_url":"https://api.github.com/users/fbjork/orgs","repos_url":"https://api.github.com/users/fbjork/repos","events_url":"https://api.github.com/users/fbjork/events{/privacy}","received_events_url":"https://api.github.com/users/fbjork/received_events","type":"User","site_admin":false},"created_at":"2015-06-24T16:47:55Z","updated_at":"2015-06-24T16:47:55Z","body":"@josevalim ok thanks. Do you have an example of how to tell Ecto to work with the data type?"}}