{"id":23334060,"url":"https://github.com/simplesoft-pt/iniparser","last_synced_at":"2026-03-03T14:33:13.525Z","repository":{"id":75304809,"uuid":"79611434","full_name":"simplesoft-pt/IniParser","owner":"simplesoft-pt","description":"C# parser for INI files and strings.","archived":false,"fork":false,"pushed_at":"2017-02-15T23:33:40.000Z","size":128,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T20:51:12.443Z","etag":null,"topics":["c-sharp","dotnet","dotnet-core","ini","parser"],"latest_commit_sha":null,"homepage":null,"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/simplesoft-pt.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}},"created_at":"2017-01-21T00:08:17.000Z","updated_at":"2022-01-28T18:48:04.000Z","dependencies_parsed_at":"2023-06-16T07:15:23.313Z","dependency_job_id":null,"html_url":"https://github.com/simplesoft-pt/IniParser","commit_stats":null,"previous_names":["gravity00/simplesoft.iniparser"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplesoft-pt%2FIniParser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplesoft-pt%2FIniParser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplesoft-pt%2FIniParser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplesoft-pt%2FIniParser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simplesoft-pt","download_url":"https://codeload.github.com/simplesoft-pt/IniParser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248092251,"owners_count":21046444,"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":["c-sharp","dotnet","dotnet-core","ini","parser"],"created_at":"2024-12-21T00:37:33.813Z","updated_at":"2026-03-03T14:33:13.496Z","avatar_url":"https://github.com/simplesoft-pt.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimpleSoft.IniParser\nLibrary implemented in .NET using C# that helps developers to deserialize or serialize INI files and strings.\nIt is compatible with a large range of .NET framework versions, from desktop, to mobile and servers.\n\n## Installation \nThis library can be installed via [NuGet](https://www.nuget.org/packages/SimpleSoft.IniParser) package. Just run the following command:\n\n```powershell\nInstall-Package SimpleSoft.IniParser -Pre\n```\nThe most recent version is in Release Candidate 1. It is considered very stable, just missing some extension methods to make it simpler to manage `IniContainer`, `IniSection` or `IniProperties` instances and compatibility with older PCL.\n\n## Compatibility\n\nThis library is compatible with the folowing frameworks:\n\n* .NET Framework 4.5\n* .NET Core 5.0;\n* .NET Standard 1.0;\n\n## Usage (Version 1.0.0-rc01)\n\n### Basic example:\n\n```csharp\nusing System;\nusing Microsoft.Extensions.Logging;\nusing SimpleSoft.IniParser.Impl;\n\nnamespace SimpleSoft.IniParser.Examples\n{\n    public class BasicExample : IExample\n    {\n        private readonly ILogger\u003cBasicExample\u003e _logger;\n\n        public BasicExample(ILogger\u003cBasicExample\u003e logger)\n        {\n            _logger = logger;\n        }\n\n        public void Run()\n        {\n            const string initialIni = @\"\n;This is a comment\nSomeGP=This is a global property\n[SomeSection]\n;This is a comment inside a section\nSomeSP=This is a property inside a section\n[AnotherSection]\n;Another comment...\nAnotherSP=More?\nResponse=YES!!!\n\";\n            _logger.LogInformation(\"Initial INI string: '{initialIniString}'\", initialIni);\n\n            _logger.LogDebug(\"Deserializing string as an IniContainer...\");\n            var deserializer = new IniDeserializer\n            {\n                Options = {NormalizeAfterDeserialization = false}\n            };\n            var iniContainer = deserializer.DeserializeAsContainer(initialIni);\n\n            _logger.LogDebug(\"Normalizing IniContainer...\");\n            var normalizer = new IniNormalizer();\n            iniContainer = normalizer.Normalize(iniContainer);\n\n            _logger.LogDebug(\"Serializing IniContainer as a string...\");\n            var serializer = new IniSerializer\n            {\n                Options = {EmptyLineBeforeSection = true, NormalizeBeforeSerialization = false}\n            };\n            var finalIni = serializer.SerializeAsString(iniContainer);\n\n            _logger.LogInformation(\"Final INI string: \" + Environment.NewLine + \"'{finalIniString}'\", finalIni);\n            /*\n;This is a comment\nSOMEGP=This is a global property\n\n[SOMESECTION]\n;This is a comment inside a section\nSOMESP=This is a property inside a section\n\n[ANOTHERSECTION]\n;Another comment...\nANOTHERSP=More?\nRESPONSE=YES!!!\n            */\n        }\n    }\n}\n\n```\n\n### Default global properties:\n\n```csharp\nusing System;\nusing Microsoft.Extensions.Logging;\nusing SimpleSoft.IniParser.Impl;\n\nnamespace SimpleSoft.IniParser.Examples\n{\n    public class DefaultGlobalInstanceExample : IExample\n    {\n        private readonly ILogger\u003cDefaultGlobalInstanceExample\u003e _logger;\n\n        public DefaultGlobalInstanceExample(ILogger\u003cDefaultGlobalInstanceExample\u003e logger)\n        {\n            _logger = logger;\n        }\n\n        public void Run()\n        {\n            const string initialIni = @\"\n;This is a comment\nSomeGP=This is a global property\n[SomeSection]\n;This is a comment inside a section\nSomeSP=This is a property inside a section\n[AnotherSection]\n;Another comment...\nAnotherSP=More?\nResponse=YES!!!\n\";\n            _logger.LogInformation(\"Initial INI string: '{initialIniString}'\", initialIni);\n\n            _logger.LogDebug(\"Deserializing string as an IniContainer...\");\n            var iniContainer = IniDeserializer.Default.DeserializeAsContainer(initialIni);\n\n            _logger.LogDebug(\"Normalizing IniContainer...\");\n            iniContainer = IniNormalizer.Default.Normalize(iniContainer);\n\n            _logger.LogDebug(\"Serializing IniContainer as a string...\");\n            var finalIni = IniSerializer.Default.SerializeAsString(iniContainer);\n\n            _logger.LogInformation(\"Final INI string: \" + Environment.NewLine + \"'{finalIniString}'\", finalIni);\n            /*\n;This is a comment\nSOMEGP=This is a global property\n\n[SOMESECTION]\n;This is a comment inside a section\nSOMESP=This is a property inside a section\n\n[ANOTHERSECTION]\n;Another comment...\nANOTHERSP=More?\nRESPONSE=YES!!!\n            */\n        }\n    }\n}\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplesoft-pt%2Finiparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplesoft-pt%2Finiparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplesoft-pt%2Finiparser/lists"}