{"id":28558196,"url":"https://github.com/downstize/section-to-json-converter","last_synced_at":"2026-04-30T19:31:11.542Z","repository":{"id":297931096,"uuid":"998330564","full_name":"Downstize/section-to-json-converter","owner":"Downstize","description":"Консольное приложение на C#, преобразующее структурированный текст с разделами в вложенный JSON.","archived":false,"fork":false,"pushed_at":"2025-06-08T12:01:14.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-08T12:30:05.357Z","etag":null,"topics":["console","converter","csharp","dotnet9","json","parser","regex"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Downstize.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-08T11:37:04.000Z","updated_at":"2025-06-08T12:03:34.000Z","dependencies_parsed_at":"2025-06-08T12:41:22.065Z","dependency_job_id":null,"html_url":"https://github.com/Downstize/section-to-json-converter","commit_stats":null,"previous_names":["downstize/section-to-json-converter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Downstize%2Fsection-to-json-converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Downstize%2Fsection-to-json-converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Downstize%2Fsection-to-json-converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Downstize%2Fsection-to-json-converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Downstize","download_url":"https://codeload.github.com/Downstize/section-to-json-converter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Downstize%2Fsection-to-json-converter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259033837,"owners_count":22795770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["console","converter","csharp","dotnet9","json","parser","regex"],"created_at":"2025-06-10T08:08:11.874Z","updated_at":"2026-04-30T19:31:11.536Z","avatar_url":"https://github.com/Downstize.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📚 section-to-json-converter\n\n**Консольное приложение на C# для преобразования текстовой иерархии разделов в JSON-структуру.**\nПроект реализован на **.NET 9**, с возможностью чтения из файла и сохранением результата в удобочитаемом JSON-формате.\n\n---\n\n## 📌 Функциональность\n\n* Чтение текстового файла с разделами и подзаголовками (`1`, `1.1`, `1.1.1`, …).\n* Преобразование структуры в корректный **вложенный JSON**.\n* Поддержка:\n\n  * вложенных уровней разделов\n  * разделов с содержимым и без\n* Вывод результата в файл `output.json`.\n\n---\n\n## 🛠️ Технологии\n\n* **.NET 9 (Console Application)**\n* **System.Text.Json** (сериализация)\n* **Regular Expressions** (распознавание разделов)\n* **Stack + Dictionary** (построение структуры)\n\n---\n\n## 📂 Структура проекта\n\n```\n📦 section-to-json-converter\n┣ 📂 data-files         # Входные и выходные данные\n┃ ┣ 📄 content_eng.txt  # Исходный текстовый файл\n┃ ┗ 📄 output.json      # Результат преобразования\n┣ 📄 Program.cs         # Основная логика программы\n┣ 📄 section-to-json-converter.csproj\n┣ 📄 section-to-json-converter.sln\n```\n\n---\n\n## 🚀 Запуск проекта\n\n1️⃣ Склонируйте репозиторий и откройте проект:\n\n```bash\ngit clone https://github.com/Downstize/section-to-json-converter.git\ncd section-to-json-converter\n```\n\n2️⃣ Убедитесь, что файл `content_eng.txt` лежит в папке `data-files`.\n\n3️⃣ Запустите проект из IDE или через .NET CLI:\n\n```bash\ndotnet run\n```\n\n4️⃣ Результат будет сохранён в:\n\n```\ndata-files/output.json\n```\n\n---\n\n## 📄 Пример\n\nИсходный файл `content_eng.txt`:\n\n```\n1 Общий раздел\nОписание\n2 Технический раздел\n2.1 Подраздел A\nТекст A\n2.2 Подраздел B\nТекст B\n```\n\nРезультат (`output.json`):\n\n```json\n{\n  \"1 Общий раздел\": \"Описание\",\n  \"2 Технический раздел\": {\n    \"2.1 Подраздел A\": \"Текст A\",\n    \"2.2 Подраздел B\": \"Текст B\"\n  }\n}\n```\n\n---\n\n## 📌 Как это работает\n\n🔢 Программа определяет, что строка начинается с числа — это новый раздел.  \n🧱 Использует **стек** для построения вложенности.  \n🧾 Текст после раздела — это содержимое, если нет вложенных разделов.\n\n---\n\n## 🗂 Папка data-files\n\nИспользуется как рабочая директория:\n\n| Файл              | Назначение                          |\n| ----------------- | ----------------------------------- |\n| `content_eng.txt` | Входные данные (структура разделов) |\n| `output.json`     | Результат работы программы          |\n\n---\n\n## ✉️ Контакты\n\nРазработчик: **Вячеслав / Venceslao**  \nGitHub:  \n[https://github.com/Downstize/section-to-json-converter.git](https://github.com/Downstize/section-to-json-converter.git)  \nEmail:  \n`swankydid@gmail.com`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdownstize%2Fsection-to-json-converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdownstize%2Fsection-to-json-converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdownstize%2Fsection-to-json-converter/lists"}