aboutsummaryrefslogtreecommitdiff
path: root/lib/guild.ml
blob: 904bbdeb0871bf983eb2aea42400469307edf13a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
type t = {
    id: string;
    name: string;
}

let from_json term =
    let module J = Yojson.Basic.Util in
    let id = J.(member "id" term |> to_string) in
    let name = J.(member "name" term |> to_string) in
    { id; name; }