blob: 5b632d75df766bc699cffe551cb56514b9d542f3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
type t = {
id: string;
content: string;
channel: string;
}
let from_json term =
let module J = Yojson.Basic.Util in
let id = J.(member "id" term |> to_string) in
let content = J.(member "content" term |> to_string) in
let channel = J.(member "channel_id" term |> to_string) in
{ id; content; channel; }
|