Use nlohmonn namespace to clean up code a bit

This commit is contained in:
mmcwilliams 2024-04-13 08:22:41 -04:00
parent 4e9f4d46f1
commit ba3ddf82de
1 changed files with 2 additions and 1 deletions

View File

@ -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;
{