//***************************************************** // чтение файла настроек и данных // все настройки, клиенты, камазы и 1 взвешивания = data/ void loadSetup() { JSONArray values; // Считываем путь до папки с настройками из put/sourse.json: try { values = loadJSONArray(put + "source.json"); // = data/ + ... // Ядиск for (int i = 0; i < values.size(); i++) { JSONObject animal = values.getJSONObject(i); filePath = animal.getString("filePath"); // адрес папки с Ядиск println(filePath); } } catch (Exception e) { printFileLog("File 'source.json' - undetected"); selectFolder("Select a folder to process:", "folderSelected"); while (!flagWork) { delay(100); } } values = new JSONArray(); JSONObject animal = new JSONObject(); animal.setString("filePath", filePath); values.setJSONObject(0, animal); saveJSONArray(values, "data/" + "source.json"); println("NEXT--->>>"); }