@@ -188,7 +188,7 @@ struct JsonFormatter::JsonFormatterImpl
188
188
if (noquote_kvs.size () + quote_kvs.size () > 0 ) {
189
189
if (m_num_recs == 0 )
190
190
begin_records_section (*real_os);
191
-
191
+
192
192
*real_os << (m_num_recs > 0 ? " ,\n " : " " ) << " {" ;
193
193
194
194
int count = 0 ;
@@ -213,7 +213,7 @@ struct JsonFormatter::JsonFormatterImpl
213
213
214
214
std::ostream& write_attributes (CaliperMetadataAccessInterface& db, std::ostream& os) {
215
215
std::vector<Attribute> attrs;
216
-
216
+
217
217
if (m_selected.empty ())
218
218
attrs = db.get_all_attributes ();
219
219
else
@@ -229,14 +229,14 @@ struct JsonFormatter::JsonFormatterImpl
229
229
attrs.erase (std::remove_if (attrs.begin (), attrs.end (),
230
230
[](const Attribute& a){ return a.is_hidden (); }),
231
231
attrs.end ());
232
-
232
+
233
233
// write "attr1": { "prop": "value", ... } , "attr2" : ...
234
234
235
235
int count = 0 ;
236
236
for (const Attribute& a : attrs) {
237
237
os << (count++ > 0 ? " ,\n " : " \n " ) << (m_opt_pretty ? " \t " : " " )
238
238
<< ' \" ' << a.name () << " \" : {" ;
239
-
239
+
240
240
// encode some properties
241
241
os << " \" is_global\" : " << (a.is_global () ? " true" : " false" )
242
242
<< " ,\" is_nested\" : " << (a.is_nested () ? " true" : " false" );
@@ -246,13 +246,13 @@ struct JsonFormatter::JsonFormatterImpl
246
246
util::write_esc_string (os << " ,\" " , db.get_attribute (node->attribute ()).name ()) << " \" : " ;
247
247
util::write_esc_string (os << " \" " , node->data ().to_string ()) << ' \" ' ;
248
248
}
249
-
249
+
250
250
os << " }" ;
251
251
}
252
252
253
253
return os;
254
254
}
255
-
255
+
256
256
std::ostream& write_globals (CaliperMetadataAccessInterface& db, std::ostream& os) {
257
257
std::vector<Entry> globals = db.get_globals ();
258
258
std::map<cali_id_t , std::string> global_vals;
@@ -286,7 +286,7 @@ struct JsonFormatter::JsonFormatterImpl
286
286
287
287
void flush (CaliperMetadataAccessInterface& db) {
288
288
std::ostream* real_os = m_os.stream ();
289
-
289
+
290
290
// close records section
291
291
if (m_num_recs == 0 )
292
292
begin_records_section (*real_os);
0 commit comments