Input string to deserializeJson gets truncated.
Before function calls, the string is 643 characters. And after only 4 characters.
Did not think the function would affect the input string.
Console output
Checking function file Result string: {"Type":"SystemFunction","Function list":{"Relay ch1":{"R/W":"W","Position":"EnergyMeter","Head Type":"Relay","Sub Type":"Main Voltage","State":"ON/OFF","Description":"Solidstate max 2A"},"Relay ch2":{"R/W":"W","Position":"EnergyMeter","Head Type":"Relay","Sub Type":"Main Voltage","State":"ON/OFF","Description":"Solidstate max 2A"},"Relay ch3":{"R/W":"W","Position":"EnergyMeter","Head Type":"Relay","Sub Type":"Main Voltage","State":"ON/OFF","Description":"Solidstate max 2A"},"Relay ch4":{"R/W":"W","Position":"EnergyMeter","Head Type":"Relay","Sub Type":"Main Voltage","State":"ON/OFF","Description":"Solidstate max 2A"}}} Result string: Type
Before running deserializeJson, i have long string ({"Type":"SystemFunction","Fun......)
But after only: Type
Input string to deserializeJson gets truncated. Before function calls, the string is 643 characters. And after only 4 characters. Did not think the function would affect the input string.
Console output
Checking function file Result string: {"Type":"SystemFunction","Function list":{"Relay ch1":{"R/W":"W","Position":"EnergyMeter","Head Type":"Relay","Sub Type":"Main Voltage","State":"ON/OFF","Description":"Solidstate max 2A"},"Relay ch2":{"R/W":"W","Position":"EnergyMeter","Head Type":"Relay","Sub Type":"Main Voltage","State":"ON/OFF","Description":"Solidstate max 2A"},"Relay ch3":{"R/W":"W","Position":"EnergyMeter","Head Type":"Relay","Sub Type":"Main Voltage","State":"ON/OFF","Description":"Solidstate max 2A"},"Relay ch4":{"R/W":"W","Position":"EnergyMeter","Head Type":"Relay","Sub Type":"Main Voltage","State":"ON/OFF","Description":"Solidstate max 2A"}}} Result string: Type
Before running deserializeJson, i have long string ({"Type":"SystemFunction","Fun......) But after only: Type
Code bool CheckJSONfunctionFile(char* functionList, uint16_t Listleght) { bool status = false; Serial.print("Checking function file\r\n"); Serial.print("Result string: "); Serial.println(functionList); DynamicJsonDocument FunclistDoc(Listleght + 100); DeserializationError err = deserializeJson(FunclistDoc, functionList, Listleght); Serial.print("Result string: "); Serial.println(functionList); if (!err)