| 272 | } |
| 273 | |
| 274 | bool TUnstrictConfig::PatchEntry(const TString& path, const TString& value, const TString& prefix /* = "" */) { |
| 275 | if (value == "__remove__") |
| 276 | return Remove(prefix + path); |
| 277 | else if (value == "__remove_all__") |
| 278 | return RemoveAll(prefix + path); |
| 279 | else if (value == "__add_section__") |
| 280 | return AddSection(prefix + path); |
| 281 | else |
| 282 | return SetValue(prefix + path, value); |
| 283 | } |
| 284 | |
| 285 | [[nodiscard]] bool TUnstrictConfig::ParseJson(const NJson::TJsonValue& json) { |
| 286 | Y_ABORT_UNLESS(ParseMemory("")); |