ligo/meta_michelson/json.ml
2019-05-12 20:57:30 +00:00

8 lines
241 B
OCaml

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)