MCPcopy Create free account
hub / github.com/catboost/catboost / OutKey

Function OutKey

tools/enum_parser/enum_parser/main.cpp:68–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66/// Simplifed JSON map encoder for generic types
67template<typename T>
68void OutKey(IOutputStream& out, const TString& key, const T& value, bool escape = true) {
69 TString quoted = ToString(value);
70 if (escape) {
71 quoted = JsonQuote(quoted);
72 }
73 out << "\"" << key << "\": " << quoted << ",\n";
74}
75
76/// Simplifed JSON map encoder for TMaybe
77void OutKey(IOutputStream& out, const TString& key, const TMaybe<TString>& value) {

Callers 1

GenerateEnumFunction · 0.85

Calls 2

JsonQuoteFunction · 0.85
ToStringFunction · 0.50

Tested by

no test coverage detected