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

Method ToJsonPatch

library/cpp/yconf/patcher/unstrict_config.cpp:95–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void TUnstrictConfig::ToJsonPatch(const Section& section, NJson::TJsonValue& result, const TString& preffix) {
96 const TString& newPreffix = preffix ? preffix + "." : TString();
97 for (const auto& i : section.GetDirectives())
98 result.InsertValue(newPreffix + i.first, i.second);
99 TSectionsMap children = section.GetAllChildren();
100 for (TSectionsMap::const_iterator i = children.begin(), e = children.end(); i != e; ++i)
101 ToJsonPatch(*i->second, result, newPreffix + i->first);
102}
103
104bool TUnstrictConfig::OnBeginSection(Section& sec) {
105 sec.Cookie = new AnyDirectives;

Callers

nothing calls this directly

Calls 3

GetAllChildrenMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected