Skip to content

Commit

Permalink
Change Poison.encode argument name to value for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
devinus committed Jun 9, 2024
1 parent b55b505 commit d8708a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/poison.ex
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ defmodule Poison do
@spec decode(iodata) :: {:ok, Parser.t()} | {:error, ParseError.t() | DecodeError.t()}
@spec decode(iodata, Decoder.options() | [Decoder.option()]) ::
{:ok, Decoder.t()} | {:error, ParseError.t() | DecodeError.t()}
def decode(iodata, options \\ %{}) do
{:ok, decode!(iodata, options)}
def decode(value, options \\ %{}) do
{:ok, decode!(value, options)}
rescue
exception in [ParseError, DecodeError] ->
{:error, exception}
Expand Down

0 comments on commit d8708a0

Please sign in to comment.