+static void Output(CYUTF8String json, std::ostream *out, bool expand = false, bool reparse = false) {
+ CYPool pool;
+
+ if (reparse) do {
+ CYStream stream(json.data, json.data + json.size);
+ CYDriver driver(pool, stream);
+ if (driver.Parse(CYMarkExpression))
+ break;
+ std::stringbuf str;
+ CYOptions options;
+ CYOutput out(str, options);
+ out.pretty_ = true;
+ out << *driver.context_;
+ std::string data(str.str());
+ json = CYPoolUTF8String(pool, data);
+ if (json.size == 0)
+ json.data = NULL;
+ } while (false);
+