6 {
7 string nameDepartment = "Department";
8 string nameSection = "Section";
9 string nameLine = "Line";
10
11 JsonDataCredits data = new JsonDataCredits();
12 data.
Departments =
new array<ref JsonDataCreditsDepartment>;
13
14 for (int index_dep = 0; index_dep < 3; ++index_dep)
15 {
16 JsonDataCreditsDepartment department = new JsonDataCreditsDepartment();
17 department.
Sections =
new array<ref JsonDataCreditsSection>();
19
20 for (int index_sec = 0; index_sec < 4; ++index_sec)
21 {
22 JsonDataCreditsSection section = new JsonDataCreditsSection();
24 section.
SectionName = (nameSection +
" "+ index_sec);
25
26 int linesCount = Math.RandomInt(3, 10);
27 for (int i = 0; i < linesCount; ++i)
28 {
30 }
31
33 }
34
36 }
37
38 string errorMessage;
39 if (!JsonFileLoader<ref JsonDataCredits>.SaveFile(
JSON_FILE_PATH, data, errorMessage))
41 }
static const string JSON_FILE_PATH
ref array< ref JsonDataCreditsDepartment > Departments
ref array< ref JsonDataCreditsSection > Sections
ref array< string > SectionLines