std::string JGenerator::serialize(const JValue &val, const JSchema &schema) { JGenerator serializer; std::string serialized; serializer.toString(val, schema, serialized); return serialized; }
static void toString(const pbnjson::JValue& val, std::string& result, bool shouldSucceed = true) { using namespace pbnjson; JGenerator serializer; bool serialized = serializer.toString(val, JSchemaFragment("{}"), result); QCOMPARE(serialized, shouldSucceed); }
bool JValue::toString(const JSchema& schema, std::string &toStr) const { JGenerator generator; return generator.toString(*this, schema, toStr); }