@@ -51,8 +51,8 @@ class Hierarchy
51
51
const std::string& label () const { return m_label; }
52
52
53
53
std::ostream& write_json (std::ostream& os) const {
54
- util::write_esc_string (os << " { \" label\" : \" " , m_label ) << " \" " ;
55
- util::write_esc_string (os << " , \" column\" : \" " , m_column) << " \" " ;
54
+ util::write_json_esc_string (os << " { \" label\" : \" " , m_label ) << " \" " ;
55
+ util::write_json_esc_string (os << " , \" column\" : \" " , m_column) << " \" " ;
56
56
57
57
if (parent () && parent ()->id () != CALI_INV_ID)
58
58
os << " , \" parent\" : " << parent ()->id ();
@@ -250,7 +250,7 @@ struct JsonSplitFormatter::JsonSplitFormatterImpl
250
250
251
251
if (!path.attributes .empty ())
252
252
columns.push_back (path);
253
-
253
+
254
254
return columns;
255
255
}
256
256
@@ -281,7 +281,7 @@ struct JsonSplitFormatter::JsonSplitFormatterImpl
281
281
for (const Entry& e : list)
282
282
if (e.attribute () == attr.id ()) {
283
283
if (quote)
284
- util::write_esc_string (os << " \" " , e.value ().to_string ()) << " \" " ;
284
+ util::write_json_esc_string (os << " \" " , e.value ().to_string ()) << " \" " ;
285
285
else
286
286
os << e.value ().to_string ();
287
287
@@ -294,7 +294,7 @@ struct JsonSplitFormatter::JsonSplitFormatterImpl
294
294
void process_record (const CaliperMetadataAccessInterface& db, const EntryList& list) {
295
295
std::lock_guard<std::mutex>
296
296
g (m_records_lock);
297
-
297
+
298
298
m_records.push_back (list);
299
299
}
300
300
@@ -316,8 +316,8 @@ struct JsonSplitFormatter::JsonSplitFormatterImpl
316
316
global_vals[e.attribute ()] = e.value ().to_string ();
317
317
318
318
for (auto &p : global_vals) {
319
- util::write_esc_string (os << " ,\n \" " , db.get_attribute (p.first ).name ()) << " \" : " ;
320
- util::write_esc_string (os << ' "' , p.second ) << ' \" ' ;
319
+ util::write_json_esc_string (os << " ,\n \" " , db.get_attribute (p.first ).name ()) << " \" : " ;
320
+ util::write_json_esc_string (os << ' "' , p.second ) << ' \" ' ;
321
321
}
322
322
323
323
return os;
@@ -340,8 +340,8 @@ struct JsonSplitFormatter::JsonSplitFormatterImpl
340
340
if (attr.id () < 12 || attr.is_hidden ())
341
341
continue ;
342
342
343
- util::write_esc_string (os << " , \" " , attr.name_c_str ()) << " \" : " ;
344
- util::write_esc_string (os << " \" " , node->data ().to_string ()) << " \" " ;
343
+ util::write_json_esc_string (os << " , \" " , attr.name_c_str ()) << " \" : " ;
344
+ util::write_json_esc_string (os << " \" " , node->data ().to_string ()) << " \" " ;
345
345
}
346
346
}
347
347
@@ -355,7 +355,7 @@ struct JsonSplitFormatter::JsonSplitFormatterImpl
355
355
{
356
356
int count = 0 ;
357
357
for (const Column& c : columns)
358
- util::write_esc_string (os << (count++ > 0 ? " , " : " " ) << " \" " , c.title ) << " \" " ;
358
+ util::write_json_esc_string (os << (count++ > 0 ? " , " : " " ) << " \" " , c.title ) << " \" " ;
359
359
}
360
360
361
361
// close "columns", start "column_metadata"
0 commit comments