Skip to content

Commit

Permalink
Merge pull request #10 from leesalminen/main
Browse files Browse the repository at this point in the history
format json output to valid parsable object
  • Loading branch information
oschonrock authored Dec 31, 2024
2 parents dc79166 + df16965 commit fc0f7ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/srv/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ auto respond(int count, auto req) {
restinio::http_field::content_type, fmt::format("{}; charset=utf-8", content_type));

if (cli.json) {
response.set_body(fmt::format("{{count:{}}}\n", count));
response.set_body(fmt::format("{{\"count\":{}}}", count));
} else {
response.set_body(fmt::format("{}\n", count));
}
Expand Down

0 comments on commit fc0f7ac

Please sign in to comment.