Skip to content

Commit c50958c

Browse files
committed
Guard from double encoding a string to json
1 parent 6df1180 commit c50958c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/ecto/adapters/sqlite3/codec.ex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ defmodule Ecto.Adapters.SQLite3.Codec do
8181
end
8282
end
8383

84+
def json_encode(value) when is_bitstring(value), do: {:ok, value}
85+
8486
def json_encode(value) do
8587
Application.get_env(:ecto_sqlite3, :json_library, Jason).encode(value)
8688
end

0 commit comments

Comments
 (0)