Skip to content

Commit

Permalink
Bring back Poison.encode_to_iodata/1
Browse files Browse the repository at this point in the history
adjust examples
  • Loading branch information
RudolfMan committed Aug 6, 2021
1 parent d9a113d commit 4495364
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 @@ -28,7 +28,7 @@ defmodule Poison do
Encode a value to JSON as iodata.
iex> Poison.encode_to_iodata([1, 2, 3])
{:ok, [91, "1", [44, "2", 44, "3"], 93]}
{:ok, [91, ["1", 44, "2", 44, "3"], 93]}
"""
@spec encode_to_iodata(Encoder.t, Keyword.t) :: {:ok, iodata} | {:error, {:invalid, any}}
def encode_to_iodata(value, options \\ []) do
Expand Down Expand Up @@ -60,7 +60,7 @@ defmodule Poison do
Encode a value to JSON as iodata, raises an exception on error.
iex> Poison.encode_to_iodata!([1, 2, 3])
[91, "1", [44, "2", 44, "3"], 93]
[91, ["1", 44, "2", 44, "3"], 93]
"""
@spec encode_to_iodata!(Encoder.t, Keyword.t) :: iodata | no_return
def encode_to_iodata!(value, options \\ []) do
Expand Down

0 comments on commit 4495364

Please sign in to comment.