| 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) { |