From ba3ddf82de7c5173cbe3e946944f87de0f1dcb71 Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Sat, 13 Apr 2024 08:22:41 -0400 Subject: [PATCH] Use nlohmonn namespace to clean up code a bit --- main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index ebeec15..dd06226 100644 --- a/main.cpp +++ b/main.cpp @@ -19,6 +19,7 @@ using namespace std; using namespace std::chrono; +using namespace nlohmann; const int DISPLAY_DURATION = 2000; const int PORT = 8081; @@ -83,7 +84,7 @@ void handleTCPConnection(int serverSocket) { string jsonString(buffer, bytesRead); try { - nlohmann::json jsonData = nlohmann::json::parse(jsonString); + json jsonData = json::parse(jsonString); cout << "Received JSON: " << jsonData << endl; {