Skip to content

Commit

Permalink
remove json dependency and use poison
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Lamb committed Dec 31, 2015
1 parent 7e7c771 commit a1e117b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/moebius/document_query.ex
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ defmodule Moebius.DocumentQuery do


defp update_command(%DocumentCommand{} = cmd, change, id) when is_map(change) and is_integer(id) do
{:ok, encoded} = JSON.encode(change)
{:ok, encoded} = Poison.encode(change)
sql = """
update #{cmd.table_name}
set #{cmd.json_field} = '#{encoded}'
Expand Down Expand Up @@ -497,7 +497,7 @@ defmodule Moebius.DocumentQuery do
end

defp insert_command(%DocumentCommand{} = cmd, doc) when is_list(doc) or is_map(doc) do
{:ok, encoded} = JSON.encode(doc)
{:ok, encoded} = Poison.encode(doc)
insert_command(cmd, encoded)
end

Expand Down
1 change: 0 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ defmodule Moebius.Mixfile do
{:timex, "~> 1.0.0"},
{:inflex, "~> 1.5.0"},
{:poison, "~> 1.5"},
{:json, "~> 0.3.0"},
{:ex_doc, "~> 0.11.2", only: [:dev, :docs]},
{:earmark, "~> 0.2.0", only: [:dev, :docs]},
{:credo, "~> 0.2.5", only: [:dev, :test]}]
Expand Down

0 comments on commit a1e117b

Please sign in to comment.