Seppo.Social -> Seppo.mro.name
[Seppo.git] / test / t_yojson.ml
blobcfdf9d398ff69cf7ce8c8ce209ee732bdd21699a
1 (*
2 * https://github.com/ocaml-community/yojson/blob/master/examples/constructing.ml
3 *)
4 let test_constructing () =
5 `Assoc
7 ("id", `String "398eb027");
8 ("name", `String "John Doe");
9 ( "pages",
10 `Assoc
11 [ ("id", `Int 1); ("title", `String "The Art of Flipping Coins") ] );
13 |> Yojson.Basic.pretty_to_string
14 |> Assrt.equals_string __LOC__
15 "{\n\
16 \ \"id\": \"398eb027\",\n\
17 \ \"name\": \"John Doe\",\n\
18 \ \"pages\": { \"id\": 1, \"title\": \"The Art of Flipping Coins\" }\n\
21 let () =
22 test_constructing ();
23 assert true