Skip to content

Commit f775592

Browse files
fhunlethmichalmuskala
authored andcommitted
Raise if trying to decode decimals without decimal
1 parent 79d59df commit f775592

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/decoder.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ defmodule Jason.Decoder do
9797
end
9898
end
9999
end
100+
else
101+
defp float_decode_function(%{floats: :decimals}) do
102+
raise ArgumentError, "decimal library not found, :decimals option not available"
103+
end
100104
end
101105

102106
defp value(data, original, skip, stack, decode) do

0 commit comments

Comments
 (0)