Skip to content
Snippets Groups Projects
Commit e47b25ec authored by Julien Girard-Satabin's avatar Julien Girard-Satabin
Browse files

[json] Remove JSON module altogether

parent bccffcc0
No related branches found
No related tags found
No related merge requests found
...@@ -182,7 +182,7 @@ let record_verification_result verification_result file = ...@@ -182,7 +182,7 @@ let record_verification_result verification_result file =
verification_result verification_result
let verify_json ?memlimit ?timelimit ?outfile json = let verify_json ?memlimit ?timelimit ?outfile json =
let query = Json.to_query json in let query = Verification_types.Query.of_json json in
let query = let query =
(* Precedence to the command line option, if any. *) (* Precedence to the command line option, if any. *)
(* TODO: * get proper default value instead of defining it twice in (* TODO: * get proper default value instead of defining it twice in
......
...@@ -93,6 +93,16 @@ module Query = struct ...@@ -93,6 +93,16 @@ module Query = struct
dataset; dataset;
} }
let of_json s =
match of_yojson (Yojson.Safe.from_file s) with
| Ok t -> t
| Error msg ->
invalid_arg
(Fmt.str "Unrecognized JSON configuration in file '%s' (%s)" s msg)
| exception Yojson.Json_error msg ->
failwith
(Fmt.str "Unexpected error while parsing JSON file '%s' (%s)" s msg)
let pretty fmt = Fmt.fmt "%a" fmt pp let pretty fmt = Fmt.fmt "%a" fmt pp
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment