diff --git a/src/nfc.cpp b/src/nfc.cpp index 47dbab4..1003835 100644 --- a/src/nfc.cpp +++ b/src/nfc.cpp @@ -221,13 +221,13 @@ bool decodeNdefAndReturnJson(const byte* encodedMessage) { // Sende die aktualisierten AMS-Daten an alle WebSocket-Clients Serial.println("JSON-Dokument erfolgreich verarbeitet"); Serial.println(doc.as()); - if (doc.containsKey("sm_id") && doc["sm_id"] != "") + if (doc["sm_id"].is() && doc["sm_id"] != "") { Serial.println("SPOOL-ID gefunden: " + doc["sm_id"].as()); activeSpoolId = doc["sm_id"].as(); lastSpoolId = activeSpoolId; } - else if(doc.containsKey("location") && doc["location"] != "") + else if(doc["location"].is() && doc["location"] != "") { Serial.println("Location Tag found!"); String location = doc["location"].as();