summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog6
-rw-r--r--lib/bindings.ml8
2 files changed, 14 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 5dc7370..dc8fdba 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libvyosconfig0 (0.0.10) unstable; urgency=medium
+
+ * Expose JSON rendering functions.
+
+ -- Daniil Baturin <daniil@baturin.org> Sun, 27 Oct 2019 14:38:08 +0100
+
libvyosconfig0 (0.0.9) unstable; urgency=medium
* Proper reporting of syntax error line number and character position.
diff --git a/lib/bindings.ml b/lib/bindings.ml
index 1734a52..db1d375 100644
--- a/lib/bindings.ml
+++ b/lib/bindings.ml
@@ -37,6 +37,12 @@ let get_error () = !error_message
let render_config c_ptr =
CT.render_config (Root.get c_ptr)
+let render_json c_ptr =
+ CT.render_json (Root.get c_ptr)
+
+let render_json_ast c_ptr =
+ CT.render_json_ast (Root.get c_ptr)
+
let render_commands c_ptr =
CT.render_commands (Root.get c_ptr) []
@@ -155,6 +161,8 @@ struct
let () = I.internal "from_string" (string @-> returning (ptr void)) from_string
let () = I.internal "get_error" (void @-> returning string) get_error
let () = I.internal "to_string" ((ptr void) @-> returning string) render_config
+ let () = I.internal "to_json" ((ptr void) @-> returning string) render_json
+ let () = I.internal "to_json_ast" ((ptr void) @-> returning string) render_json_ast
let () = I.internal "to_commands" ((ptr void) @-> returning string) render_commands
let () = I.internal "set_add_value" ((ptr void) @-> string @-> string @-> returning int) set_add_value
let () = I.internal "set_replace_value" ((ptr void) @-> string @-> string @-> returning int) set_replace_value