MCPcopy Create free account
hub / github.com/comaps/comaps / SerializeToJSONLines

Method SerializeToJSONLines

libs/search/search_quality/sample.cpp:157–165  ·  view source on GitHub ↗

static

Source from the content-addressed store, hash-verified

155
156// static
157void Sample::SerializeToJSONLines(vector<Sample> const & samples, string & lines)
158{
159 for (auto const & sample : samples)
160 {
161 unique_ptr<char, JSONFreeDeleter> buffer(json_dumps(sample.SerializeToJSON().get(), JSON_COMPACT));
162 lines.append(buffer.get());
163 lines.push_back('\n');
164 }
165}
166
167void Sample::DeserializeFromJSONImpl(json_t * root)
168{

Callers

nothing calls this directly

Calls 4

SerializeToJSONMethod · 0.80
getMethod · 0.65
appendMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected