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

Method LeaveNode

library/cpp/yson/json/json_writer.cpp:77–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75 }
76
77 void TJsonWriter::LeaveNode() {
78 Y_ASSERT(!HasUnfoldedStructureStack.empty());
79 if (HasUnfoldedStructureStack.back()) {
80 // Close map of the {$attributes, $value}
81 JsonWriter->CloseMap();
82 }
83 HasUnfoldedStructureStack.pop_back();
84
85 Depth -= 1;
86
87 if (Depth == 0 && Type == ::NYson::EYsonType::ListFragment && InAttributesBalance == 0) {
88 JsonWriter->Flush();
89 Output->Write("\n");
90 }
91 }
92
93 bool TJsonWriter::IsWriteAllowed() {
94 if (AttributesMode == JAM_NEVER) {

Callers

nothing calls this directly

Calls 6

emptyMethod · 0.45
backMethod · 0.45
CloseMapMethod · 0.45
pop_backMethod · 0.45
FlushMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected