File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -310,18 +310,18 @@ JSONOutput(Metadata* metadata)
310310 std::vector<meta_word> words = WordsFromMetadata (metadata);
311311
312312 std::ostringstream out_string;
313- out_string << " { \ " metadata\ " :{\ " confidence\" : " << std::to_string ( metadata->probability ) << " }, \ " words\ " :[" ;
313+ out_string << R"( { "metadata":{"confidence": ) " << metadata->probability << R"( }, "words":[) " ;
314314
315315 for (int i = 0 ; i < words.size (); i++) {
316316 meta_word w = words[i];
317- out_string << " { \ " word\" : \" " << w.word << " \" , \ " time\" : " << std::to_string ( w.start_time ) << " , \ " duration\" : " << std::to_string ( w.duration ) << " }" ;
317+ out_string << R"( { "word":" ) " << w.word << R"( ", "time": ) " << w.start_time << R"( , "duration": ) " << w.duration << " }" ;
318318
319319 if (i < words.size () - 1 ) {
320320 out_string << " ," ;
321321 }
322322 }
323323
324- out_string << " ]}" ;
324+ out_string << " ]}\n " ;
325325
326326 return strdup (out_string.str ().c_str ());
327327}
You can’t perform that action at this time.
0 commit comments