Parsing of raw ints
petevanwesep opened this issue · comments
Pete van Wesep commented
As I understand it, a raw integer is valid JSON according to https://tools.ietf.org/html/rfc7159#section-2.
That being the case, I am interested in why this would result in a parsing error:
iex(1)> Poison.Parser.parse!(0)
0
** (ArgumentError) argument error
:erlang.iolist_to_binary(0)
(poison) lib/poison/parser.ex:35: Poison.Parser.parse/2
(poison) lib/poison/parser.ex:52: Poison.Parser.parse!/2
Peter van Wesep commented
A: Parsed JSON should be contained in a string 🙌