@@ -64,10 +64,10 @@ namespace nlohmann {
6464 }
6565
6666 static void to_json (json& obj, const recorder::TetrionHeader& tetrion_header) {
67- obj = nlohmann::json{
68- { " seed" , tetrion_header.seed },
69- { " starting_level" , tetrion_header.starting_level }
70- };
67+ obj = nlohmann::json::object ( {
68+ { " seed" , tetrion_header.seed },
69+ { " starting_level" , tetrion_header.starting_level }
70+ }) ;
7171 }
7272 };
7373
@@ -93,11 +93,11 @@ namespace nlohmann {
9393
9494 static void to_json (json& obj, const recorder::Record& record) {
9595
96- obj = nlohmann::json{
97- { " tetrion_index" , record.tetrion_index },
98- { " simulation_step_index" , record.simulation_step_index },
99- { " event" , record.event }
100- };
96+ obj = nlohmann::json::object ( {
97+ { " tetrion_index" , record.tetrion_index },
98+ { " simulation_step_index" , record.simulation_step_index },
99+ { " event" , record.event }
100+ }) ;
101101 }
102102 };
103103
@@ -110,10 +110,10 @@ namespace nlohmann {
110110 }
111111
112112 static void to_json (json& obj, const shapes::AbstractPoint<T>& point) {
113- obj = nlohmann::json{
114- { " x" , point.x },
115- { " y" , point.y }
116- };
113+ obj = nlohmann::json::object ( {
114+ { " x" , point.x },
115+ { " y" , point.y }
116+ }) ;
117117 }
118118 };
119119
@@ -139,10 +139,10 @@ namespace nlohmann {
139139 }
140140
141141 static void to_json (json& obj, const Mino& mino) {
142- obj = nlohmann::json{
143- { " position" , mino.position () },
144- { " type" , mino.type () }
145- };
142+ obj = nlohmann::json::object ( {
143+ { " position" , mino.position () },
144+ { " type" , mino.type () }
145+ }) ;
146146 }
147147 };
148148
@@ -160,14 +160,14 @@ namespace nlohmann {
160160 nlohmann::adl_serializer<std::vector<Mino>>::to_json (mino_stack_json, snapshot.mino_stack ().minos ());
161161
162162
163- obj = nlohmann::json{
164- { " tetrion_index" , snapshot.tetrion_index () },
165- { " level" , snapshot.level () },
166- { " score" , snapshot.score () },
167- { " lines_cleared" , snapshot.lines_cleared () },
168- { " simulation_step_index" , snapshot.simulation_step_index () },
169- { " mino_stack" , mino_stack_json }
170- };
163+ obj = nlohmann::json::object ( {
164+ { " tetrion_index" , snapshot.tetrion_index () },
165+ { " level" , snapshot.level () },
166+ { " score" , snapshot.score () },
167+ { " lines_cleared" , snapshot.lines_cleared () },
168+ { " simulation_step_index" , snapshot.simulation_step_index () },
169+ { " mino_stack" , mino_stack_json }
170+ }) ;
171171 }
172172 };
173173
@@ -199,13 +199,13 @@ namespace nlohmann {
199199 snapshots_json, recording_reader.snapshots ()
200200 );
201201
202- obj = nlohmann::json{
203- { " version" , recorder::Recording::current_supported_version_number },
204- { " information" , information_json },
205- { " tetrion_headers" , tetrion_headers_json },
206- { " records" , records_json },
207- { " snapshots" , snapshots_json },
208- };
202+ obj = nlohmann::json::object ( {
203+ { " version" , recorder::Recording::current_supported_version_number },
204+ { " information" , information_json },
205+ { " tetrion_headers" , tetrion_headers_json },
206+ { " records" , records_json },
207+ { " snapshots" , snapshots_json },
208+ }) ;
209209 }
210210 };
211211} // namespace nlohmann
0 commit comments