From d342c4cf9fe907d2107cd815f9988f8ad147218b Mon Sep 17 00:00:00 2001 From: Mishio595 Date: Sat, 24 Nov 2018 09:51:03 -0700 Subject: Major structural changes --- lib/channel.ml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lib/channel.ml (limited to 'lib/channel.ml') diff --git a/lib/channel.ml b/lib/channel.ml new file mode 100644 index 0000000..904bbde --- /dev/null +++ b/lib/channel.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; } -- cgit v1.2.3