From f947b3e8e7b9db2fcab250ce6d8050b650130cec Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Tue, 10 Jan 2017 03:50:28 +0700 Subject: Add JSON de/serialization derivers to vytree and config tree modules. --- src/config_tree.ml | 4 ++-- src/config_tree.mli | 4 ++-- src/vytree.ml | 2 +- src/vytree.mli | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/config_tree.ml b/src/config_tree.ml index f99c737..538b258 100644 --- a/src/config_tree.ml +++ b/src/config_tree.ml @@ -10,9 +10,9 @@ type config_node_data = { comment: string option; inactive: bool; ephemeral: bool; -} +} [@@deriving yojson] -type t = config_node_data Vytree.t +type t = config_node_data Vytree.t [@@deriving yojson] let default_data = { values = []; diff --git a/src/config_tree.mli b/src/config_tree.mli index 2c463cb..4da734e 100644 --- a/src/config_tree.mli +++ b/src/config_tree.mli @@ -8,9 +8,9 @@ type config_node_data = { comment : string option; inactive : bool; ephemeral : bool; -} +} [@@deriving yojson] -type t = config_node_data Vytree.t +type t = config_node_data Vytree.t [@@deriving yojson] val default_data : config_node_data diff --git a/src/vytree.ml b/src/vytree.ml index b27aea6..74dbe45 100644 --- a/src/vytree.ml +++ b/src/vytree.ml @@ -2,7 +2,7 @@ type 'a t = { name: string; data: 'a; children: 'a t list -} +} [@@deriving yojson] type position = Before of string | After of string | End | Default diff --git a/src/vytree.mli b/src/vytree.mli index d00d3ff..02d8edf 100644 --- a/src/vytree.mli +++ b/src/vytree.mli @@ -1,4 +1,4 @@ -type 'a t +type 'a t [@@deriving yojson] exception Empty_path exception Duplicate_child -- cgit v1.2.3