Skip to content

Commit

Permalink
double quotes in json
Browse files Browse the repository at this point in the history
  • Loading branch information
folkertvanheusden committed Aug 6, 2023
1 parent 703a3c6 commit 00acda7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mynetperf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void mynetperf_handle_data(session *const session_in)

session->req_len = data_keep;

std::string reply = myformat("{ 'result' : 'ok', 'took': %zu, 'unit': 'us' }\n", now_ts - session->start_ts);
std::string reply = myformat("{ \"result\": \"ok\", \"took\": %zu, \"unit\": \"us\" }\n", now_ts - session->start_ts);

session_in->get_stream_target()->send_data(session_in, reinterpret_cast<const uint8_t *>(reply.c_str()), reply.size());

Expand Down Expand Up @@ -96,7 +96,7 @@ void mynetperf_handle_data(session *const session_in)
return;
}

std::string reply = "{ 'result' : 'ok' }\n";
std::string reply = "{ \"result\" : \"ok\" }\n";

session_in->get_stream_target()->send_data(session_in, reinterpret_cast<const uint8_t *>(reply.c_str()), reply.size());

Expand Down

0 comments on commit 00acda7

Please sign in to comment.