| 66 | } |
| 67 | |
| 68 | void serialization_example2() |
| 69 | { |
| 70 | |
| 71 | json val; |
| 72 | |
| 73 | val["verts"] = json(json_array_arg, {1, 2, 3}); |
| 74 | val["normals"] = json(json_array_arg, {1, 0, 1}); |
| 75 | val["uvs"] = json(json_array_arg, {0, 0, 1, 1}); |
| 76 | |
| 77 | std::cout << "Default object-array same line options" << std::endl; |
| 78 | std::cout << pretty_print(val) << std::endl; |
| 79 | |
| 80 | std::cout << "object_array_line_splits(line_split_kind::same_line)" << std::endl; |
| 81 | auto options1 = json_options{} |
| 82 | .object_array_line_splits(line_split_kind::same_line); |
| 83 | std::cout << pretty_print(val,options1) << std::endl; |
| 84 | |
| 85 | std::cout << "object_array_line_splits(line_split_kind::new_line)" << std::endl; |
| 86 | auto options2 = json_options{} |
| 87 | .object_array_line_splits(line_split_kind::new_line); |
| 88 | std::cout << pretty_print(val,options2 ) << std::endl; |
| 89 | |
| 90 | std::cout << "object_array_line_splits(line_split_kind::multi_line)" << std::endl; |
| 91 | auto options3 = json_options{} |
| 92 | .object_array_line_splits(line_split_kind::multi_line); |
| 93 | std::cout << pretty_print(val,options3) << std::endl; |
| 94 | } |
| 95 | |
| 96 | void serialization_example3() |
| 97 | { |
no test coverage detected