From 86433135f3428cfd3f0184f10411bc169e2ae9b9 Mon Sep 17 00:00:00 2001 From: ipkn Date: Thu, 17 Apr 2014 10:06:41 -0400 Subject: response can return json object --- example.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'example.cpp') diff --git a/example.cpp b/example.cpp index 54efccf..16116a8 100644 --- a/example.cpp +++ b/example.cpp @@ -1,4 +1,5 @@ #include "flask.h" +#include "json.h" #include @@ -14,7 +15,9 @@ int main() FLASK_ROUTE(app, "/json") ([]{ - return "{\"message\":\"Hello, World!\"}"; + flask::json::wvalue x; + x["message"] = "Hello, World!"; + return x; }); FLASK_ROUTE(app, "/about") -- cgit v1.2.3-54-g00ecf