Fix write with string

This commit is contained in:
cschwinne 2020-09-09 10:21:56 +02:00
parent 649ebb8a4e
commit 6ef4582ebd

View File

@ -166,7 +166,7 @@ bool appendObjectToFile(const char* file, const char* key, JsonDocument* content
Serial.print("clen"); Serial.println(contentLen); Serial.print("clen"); Serial.println(contentLen);
if (bufferedFindSpace(contentLen + strlen(key) + 1, f)) { if (bufferedFindSpace(contentLen + strlen(key) + 1, f)) {
Serial.println("space"); Serial.println("space");
if (f.position() > 2) f.write(","); //add comma if not first object if (f.position() > 2) f.write(','); //add comma if not first object
f.print(key); f.print(key);
serializeJson(*content, f); serializeJson(*content, f);
return true; return true;