small fix in data parser

This commit is contained in:
Nic Limper
2023-09-26 22:53:59 +02:00
parent 2e44889b19
commit 29b8c9bc21

View File

@@ -6,18 +6,17 @@
std::unordered_map<size_t, TagData::Parser> TagData::parsers = {};
void TagData::loadParsers(const String& filename) {
Serial.println("Reading parsers from file");
const long start = millis();
Storage.begin();
fs::File file = contentFS->open(filename, "r");
if (!file) {
Serial.println("loadParsers: Failed to open file");
return;
}
Serial.println("Reading parsers from file");
if (file.find("[")) {
StaticJsonDocument<1000> doc;
DynamicJsonDocument doc(1000);
bool parsing = true;
while (parsing) {
DeserializationError err = deserializeJson(doc, file);