#pragma once #include "crow.h" #include "AnnotationTypes.hpp" namespace Response { using Reply::AnnotationType; typedef crow::json::wvalue json; // create a full response of just plain text json simple_response(std::string const &text, std::string const &session = "null", bool success = true); // "nested" annotations: the extra field is again an array of text-annotation pairs json create_annotation(AnnotationType annotation, std::vector &&extra); // construct an extra field with no special annotations in the extra json create_annotation(AnnotationType annotation = AnnotationType::none, std::string const &extra = ""); // text with no special annotation json create_text(std::string const &text); // text with annotations json create_text(std::string const &text, std::vector &&annotations); // create a response from multiple texts json create_response(std::vector &&reply, std::string const &session = "null", bool success = true); }