-
Notifications
You must be signed in to change notification settings - Fork 214
Open
Description
Is it possible to enforce UTF-8 encoding on the input? E.g for Jason when passing in a non UTF-8 character such as <<202>> we get an error whilst Poison gives us useless output:
iex(15)> Poison.encode!(%{foo: <<202>>})
<<123, 34, 97, 100, 109, 34, 58, 34, 202, 34, 125>>
iex(16)> Jason.encode!(%{foo: <<202>>})
** (Jason.EncodeError) invalid byte 0xCA in <<202>>
(jason 1.5.0-alpha.2) lib/jason.ex:164: Jason.encode!/2
iex:16: (file)
Metadata
Metadata
Assignees
Labels
No labels