This commit is contained in:
atagen 2024-11-23 16:49:05 +11:00 committed by atagen
commit e598b04cae
31 changed files with 946 additions and 0 deletions

8
lib/json.ml Normal file
View file

@ -0,0 +1,8 @@
let parse_json src = Yojson.Basic.from_string src
let jfield key = function
| `Assoc pairs -> List.assoc_opt key pairs
| _ -> None
let jstring = function `String s -> Some s | _ -> None
let jassoc = function `Assoc pairs -> Some pairs | _ -> None