// Receiver side, UNMODIFIED forumer_core: parse + verify a post and print how it would be shown. #include "forumer_core/post.h" #include #include using namespace forumer; int main() { std::string json((std::istreambuf_iterator(std::cin)), std::istreambuf_iterator()); auto p = post::Post::fromJson(json); if (!p) { std::cout << "fromJson: rejected\n"; return 0; } auto err = post::verify(*p, 16); std::cout << "verify: " << post::describe(err) << "; author shown to readers as: \"" << p->authorDisplay() << "\"\n"; }