Skip to content

Commit f90904b

Browse files
committed
FIX
1 parent 6ec6e75 commit f90904b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/js_of_ocaml/json.ml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,10 @@ let input_reviver =
141141
let unsafe_input s =
142142
match Sys.backend_type with
143143
| Other "wasm_of_ocaml" ->
144-
failwith
145-
"Json.unsafe_input: not implemented (and not planned) in the Wasm backend as the \
146-
inverse of `output` is not implementable"
144+
(* https://github.com/ocsigen/js_of_ocaml/pull/1660#discussion_r1731099372
145+
The encoding of OCaml values is ambiguous since both integers and floats
146+
are mapped to numbers *)
147+
failwith "Json.unsafe_input: not implemented in the Wasm backend"
147148
| _ -> json##parse_ s input_reviver
148149

149150
class type obj = object

0 commit comments

Comments
 (0)