15 #include <nlohmann/json.hpp>
22 explicit JsonView(
const nlohmann::json& payload);
24 std::string
render(
const std::map<std::string, std::string>& context = {})
const override;
Abstract base class for all views in the PicoFramework.
A view that renders structured JSON and returns "application/json" content type.
std::string getContentType() const override
Return the MIME content type for this view.
std::string render(const std::map< std::string, std::string > &context={}) const override
Render the view body.