Use nlohmonn namespace to clean up code a bit
This commit is contained in:
parent
4e9f4d46f1
commit
ba3ddf82de
3
main.cpp
3
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;
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue