From 3a37fcde35877e1bde9864b07192aaca0ada42e5 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 12 Apr 2012 14:11:22 +1000 Subject: [PATCH] Add convenience wrapper json::write function --- json.cpp.rl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/json.cpp.rl b/json.cpp.rl index 92155ec0..7b8fb5e4 100644 --- a/json.cpp.rl +++ b/json.cpp.rl @@ -274,6 +274,11 @@ json::parse (const char *start) { return parse (start, start + strlen (start)); } +void +json::write (const json::node &node, std::ostream &os) + { node.write (os); } + + const json::object& json::node::to_object (void) const { throw error ("node is not an object"); }