mirage / ezjsonm

An easy interface on top of the Jsonm library.
Other
40 stars 22 forks source link

Assertion failure when parsing a number #31

Closed hcarty closed 4 years ago

hcarty commented 7 years ago

Testing with OCaml 4.04.2 and ezjsonm 0.5.0 from opam:

─utop # Ezjsonm.from_string "1";;
Exception: Assert_failure ("lib/ezjsonm.ml", 58, 59).

I know (ez)jsonm requires a wrapping array/object but an assertion failure seems worth reporting.

abate commented 6 years ago

Same problem here. Instead of assert false this function should raise a parsing error