MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / SerializeInspectionResultJson

Function SerializeInspectionResultJson

src/tools/CommandLineMain.cpp:362–368  ·  view source on GitHub ↗

Serializes the full inspection result as a JSON object. Used with --inspect mode. Handles both single-stage and pipeline converters.

Source from the content-addressed store, hash-verified

360// Serializes the full inspection result as a JSON object. Used with
361// --inspect mode. Handles both single-stage and pipeline converters.
362std::string SerializeInspectionResultJson(
363 const ConversionInspectionResult& result) {
364 rapidjson::StringBuffer buffer;
365 rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
366 WriteInspectionResultJson(writer, result);
367 return buffer.GetString();
368}
369
370std::string ConvertLineByMode(const std::string& line) {
371 WarnIfTextContainsVariationSelector(line.c_str(), line.size());

Callers 1

ConvertLineByModeFunction · 0.85

Calls 2

GetStringMethod · 0.80

Tested by

no test coverage detected