ligo/meta_michelson/json.ml

8 lines
241 B
OCaml
Raw Normal View History

2019-05-13 00:56:22 +04:00
let force_record ~msg json = match json with
| `O json -> json
| _ -> raise @@ Failure ("not json record : " ^ msg)
let force_string ~msg json = match json with
| `String str -> str
| _ -> raise @@ Failure ("not json str : " ^ msg)