summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2019-10-27 14:23:12 +0100
committerDaniil Baturin <daniil@baturin.org>2019-10-27 14:23:12 +0100
commitbf85f6a275ea2967bc39fdc6ddc5c96e929188e8 (patch)
tree7e4f92b98ed452d32948988b7d7d64993133522b
parenta25916f7ac3cfffbdbb341d099120d421d284378 (diff)
downloadvyos1x-config-bf85f6a275ea2967bc39fdc6ddc5c96e929188e8.tar.gz
vyos1x-config-bf85f6a275ea2967bc39fdc6ddc5c96e929188e8.zip
Expose the JSON AST export function.
-rw-r--r--src/config_tree.ml2
-rw-r--r--src/config_tree.mli2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/config_tree.ml b/src/config_tree.ml
index a9dd61e..31c0d76 100644
--- a/src/config_tree.ml
+++ b/src/config_tree.ml
@@ -252,3 +252,5 @@ let render_commands node path =
let render_config = Renderer.render_config
let render_json = JSONRenderer.render_json
+
+let render_json_ast c = to_yojson c |> Yojson.Safe.to_string
diff --git a/src/config_tree.mli b/src/config_tree.mli
index a0607e3..730b32f 100644
--- a/src/config_tree.mli
+++ b/src/config_tree.mli
@@ -38,3 +38,5 @@ val render_commands : t -> string list -> string
val render_config : t -> string
val render_json : t -> string
+
+val render_json_ast : t -> string