| 15 | namespace { |
| 16 | |
| 17 | std::string quote_json(const std::string & value) { |
| 18 | std::string out = "\""; |
| 19 | for (char ch : value) { |
| 20 | if (ch == '\\' || ch == '"') { |
| 21 | out.push_back('\\'); |
| 22 | } |
| 23 | out.push_back(ch); |
| 24 | } |
| 25 | out.push_back('"'); |
| 26 | return out; |
| 27 | } |
| 28 | |
| 29 | std::string speech_segments_to_json(const std::vector<engine::runtime::SpeechSegment> & segments) { |
| 30 | std::ostringstream out; |
no outgoing calls
no test coverage detected