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