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

Function ToJSON

libs/search/search_quality/sample.cpp:254–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252}
253
254base::JSONPtr ToJSON(Sample::Result const & result)
255{
256 auto root = base::NewJSONObject();
257 ToJSONObject(*root, "position", result.m_pos);
258 ToJSONObject(*root, "name", result.m_name);
259 ToJSONObject(*root, "houseNumber", result.m_houseNumber);
260 ToJSONObject(*root, "types", result.m_types);
261 ToJSONObject(*root, "relevancy", result.m_relevance);
262 return root;
263}
264
265string DebugPrint(Sample::Result::Relevance r)
266{

Callers

nothing calls this directly

Calls 2

NewJSONObjectFunction · 0.85
ToJSONObjectFunction · 0.70

Tested by

no test coverage detected