Example #1
0
std::string JGenerator::serialize(const JValue &val, const JSchema &schema)
{
	JGenerator serializer;
	std::string serialized;
	serializer.toString(val, schema, serialized);
	return serialized;
}
Example #2
0
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);
}
Example #3
0
bool JValue::toString(const JSchema& schema, std::string &toStr) const
{
	JGenerator generator;
	return generator.toString(*this, schema, toStr);
}