Closed Sourab1801 closed 1 month ago
Hi,
This program mostly appends a string to a file; you don't need a JSON library for that. Using JSONL instead of JSON for the file format would make this task trivial:
File file = SPIFFS.open(path4, FILE_WRITE);
file.println(MQ_Str);
file.close();
Best regards, Benoit
hello, actually I have string data like [{"time":1712751959000,"part_no":"Pno-1234","mc_status":2,"Alarm_1":0,"A1":0,"A2":0,"A3":0,"A4":0},{"dvc_id":"c4dee2e95a70","typ":"data"}] & I want to attach all this string data into a element of array. also i am getting this data continuously from machine & I want to store it into an array, I tried various options but it didn't worked for me, So can you tell this is possible or if it is possible then what is the accurate way to do that using this library. Also I am providing the code how I am adding data into array & storing it into JSON file.
MQ_Str contains above string data.
code: