//Example : File f = ({ InterruptLock lock; filesystem->open(filename, "w"); }); and the f becomes the argument output_stream
//useful in web.cpp via a button to save data
voidSyringeFilled::write_Json(Stream&output_stream)//file_name sera le nom du fichier Json, doc sera la structure Json qu'on veut transformer en fichier
{
/***
-Argument : output_stream (= serial or a file)
-Return : /
-Action : Save the Json structure in a file (convert it to text)
***/
InterruptLocklock;//useful thanks to its constructor (so a is not visible in the code)
serializeJson(SyringeFilledJSON,output_stream);
}
//useful in setup of pousse-seringue.cpp(to check at the begining what has already been saved) and web.cpp via a button to recover data
voidSyringeFilled::read_Json(Stream&input_stream)//file_name sera le nom du fichier Json, doc sera la structure Json qu'on veut transformer en fichier
{
/***
-Argument : input_stream (= serial or a file)
-Return : /
-Action : Check if a Json Document alredy exist or not
***/
InterruptLocklock;//useful thanks to its constructor (so a is not visible in the code)