Skip to content

Commit 2ef47a5

Browse files
authored
remove dependency on Poison and use Jason instead (#67)
1 parent 108618a commit 2ef47a5

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

lib/ex_cell/adapters/cell_js.ex

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,16 @@ defmodule ExCell.Adapters.CellJS do
4848
the default `data-cell` and `data-cell-params` attributes.
4949
"""
5050
def data_attribute(name, id, data \\ [], params \\ %{})
51-
def data_attribute(name, id, nil, params), do:
52-
data_attribute(name, id, [], params)
53-
def data_attribute(name, id, data, params), do:
54-
Keyword.merge(
55-
data,
56-
cell: name,
57-
cell_id: id,
58-
cell_params: Poison.encode!(params)
59-
)
51+
def data_attribute(name, id, nil, params), do: data_attribute(name, id, [], params)
52+
53+
def data_attribute(name, id, data, params),
54+
do:
55+
Keyword.merge(
56+
data,
57+
cell: name,
58+
cell_id: id,
59+
cell_params: Jason.encode!(params)
60+
)
6061

6162
@doc """
6263
The attributes function is used to auto fill the attributes for a container

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ defmodule ExCell.Mixfile do
5353
{:mix_test_watch, "~> 0.3", only: :dev, runtime: false},
5454
{:phoenix_html, "~> 2.10"},
5555
{:phoenix, "~> 1.4.0", optional: true},
56-
{:poison, "~> 4.0"},
56+
{:jason, "~> 1.1"},
5757
{:elixir_uuid, "~> 1.2"}
5858
]
5959
end

mix.lock

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"phoenix_pubsub": {:hex, :phoenix_pubsub, "1.1.1", "6668d787e602981f24f17a5fbb69cc98f8ab085114ebfac6cc36e10a90c8e93c", [:mix], [], "hexpm"},
2525
"plug": {:hex, :plug, "1.7.1", "8516d565fb84a6a8b2ca722e74e2cd25ca0fc9d64f364ec9dbec09d33eb78ccd", [:mix], [{:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}], "hexpm"},
2626
"plug_crypto": {:hex, :plug_crypto, "1.0.0", "18e49317d3fa343f24620ed22795ec29d4a5e602d52d1513ccea0b07d8ea7d4d", [:mix], [], "hexpm"},
27-
"poison": {:hex, :poison, "4.0.1", "bcb755a16fac91cad79bfe9fc3585bb07b9331e50cfe3420a24bcc2d735709ae", [:mix], [], "hexpm"},
2827
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.4", "f0eafff810d2041e93f915ef59899c923f4568f4585904d010387ed74988e77b", [:make, :mix, :rebar3], [], "hexpm"},
2928
"unicode_util_compat": {:hex, :unicode_util_compat, "0.4.1", "d869e4c68901dd9531385bb0c8c40444ebf624e60b6962d95952775cac5e90cd", [:rebar3], [], "hexpm"},
3029
}

0 commit comments

Comments
 (0)