Skip to content

Commit

Permalink
Replace Mix dependency :poison by :jason
Browse files Browse the repository at this point in the history
  • Loading branch information
redrabbit committed May 14, 2020
1 parent dedcfcd commit 7181de7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/exmoji.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule Exmoji do
@external_resource vendor_data_file

rawfile = File.read! vendor_data_file
rawdata = Poison.decode! rawfile, keys: :atoms
rawdata = Jason.decode! rawfile, keys: :atoms
emoji_chars = for char <- rawdata do
%EmojiChar{
name: char.name,
Expand Down Expand Up @@ -197,7 +197,7 @@ defmodule Exmoji do
# produce a string representation of the integer value of a codepoint, in hex
# this should be zero-padded to a minimum of 4 digits
defp padded_hex_string(<< cp_int_value :: utf8 >>) do
cp_int_value |> Integer.to_string(16) |> String.rjust(4,?0)
cp_int_value |> Integer.to_string(16) |> String.pad_leading(4, "0")
end


Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ defmodule Exmoji.Mixfile do
# Type `mix help deps` for more examples and options
defp deps do
[
{:poison, "~> 3.0"},
{:jason, "~> 1.2"},
{:excoveralls, "~> 0.6", only: :dev},
{:benchfella, "~> 0.3", only: :dev},
{:earmark, "~> 1.1", only: :dev},
Expand Down

0 comments on commit 7181de7

Please sign in to comment.