#include <iostream>
#include <sstream>
#include <iostream>
{
arch["pose_pdf"] = pdf1;
arch["pose"] = p1;
std::stringstream ss;
ss << arch;
std::cout << arch << std::endl;
ss.seekg(0);
ss >> arch2;
arch2["pose_pdf"].readTo(pdf2);
arch2["pose"].readTo(p2);
std::cout <<
"read pose:" << p2.
asString() << std::endl;
}
{
try
{
return 0;
}
catch (const std::exception& e)
{
return -1;
}
catch (...)
{
printf("Untyped exception!");
return -1;
}
}
#if 0 // code disabled, only present as an example for the docs:
#include <json/json.h>
void test()
{
std::make_unique<CSchemeArchive<Json::Value>>(
val));
arch = pt1;
std::stringstream ss;
std::cout <<
val << std::endl;
}
#endif