diff options
| author | Mishio595 <[email protected]> | 2018-11-24 09:51:03 -0700 |
|---|---|---|
| committer | Mishio595 <[email protected]> | 2018-11-24 09:51:03 -0700 |
| commit | d342c4cf9fe907d2107cd815f9988f8ad147218b (patch) | |
| tree | febb926d6f3e1956346db2d3ee952391b193deb9 /lib/guild.ml | |
| parent | Add opam build file (diff) | |
| download | disml-d342c4cf9fe907d2107cd815f9988f8ad147218b.tar.xz disml-d342c4cf9fe907d2107cd815f9988f8ad147218b.zip | |
Major structural changes
Diffstat (limited to 'lib/guild.ml')
| -rw-r--r-- | lib/guild.ml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/guild.ml b/lib/guild.ml new file mode 100644 index 0000000..904bbde --- /dev/null +++ b/lib/guild.ml @@ -0,0 +1,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; } |