| 32 | UTL_JSON_REFLECT(TaskList, map_of_tasks, matrix_of_points); |
| 33 | |
| 34 | int main() { |
| 35 | using namespace utl; |
| 36 | |
| 37 | const TaskList task_list = { |
| 38 | // Map of tasks |
| 39 | { |
| 40 | { "task_1", { "input_1.dat", "output_1.dat", 170. } }, |
| 41 | { "task_2", { "input_2.dat", "output_2.dat", 185. } } |
| 42 | }, |
| 43 | // Matrix of 3D points |
| 44 | { |
| 45 | { { 0, 0, 0}, { 1, 0, 0 } }, |
| 46 | { { 0, 1, 0}, { 0, 0, 1 } } |
| 47 | } |
| 48 | }; |
| 49 | |
| 50 | // Parse JSON from struct, |
| 51 | // this also doubles as a way of stringifying structs for debugging |
| 52 | std::cout << json::from_struct(task_list).to_string(); |
| 53 | } |
nothing calls this directly
no test coverage detected