Bodu.Text.Ini
1.0.0
dotnet add package Bodu.Text.Ini --version 1.0.0
NuGet\Install-Package Bodu.Text.Ini -Version 1.0.0
<PackageReference Include="Bodu.Text.Ini" Version="1.0.0" />
<PackageVersion Include="Bodu.Text.Ini" Version="1.0.0" />
<PackageReference Include="Bodu.Text.Ini" />
paket add Bodu.Text.Ini --version 1.0.0
#r "nuget: Bodu.Text.Ini, 1.0.0"
#:package Bodu.Text.Ini@1.0.0
#addin nuget:?package=Bodu.Text.Ini&version=1.0.0
#tool nuget:?package=Bodu.Text.Ini&version=1.0.0
Bodu.Text.Ini
API stability — Stable. The public API surface is committed; breaking changes are reserved for a major-version bump per SemVer.
An INI library for .NET 8, shaped after System.Text.Json: a typed serializer over a two-reader token surface, with a comment-preserving mutable document object model and a read-only one. The value model is a two-level object-of-objects — global keys hoist onto the root, each [section] is a nested object of string values.
Installation
dotnet add package Bodu.Text.Ini
Targets net8.0. Also available through the Bodu.Text.Formats umbrella package.
API shape
| Type(s) | Namespace | Role |
|---|---|---|
IniSerializer / IniSerializerOptions / IniSerializerDefaults |
Bodu.Text.Ini |
Static serializer entry point, configuration (GlobalSectionName, duplicate policies), and presets (Strict = configparser strict mode). |
IniDocumentOptions, IniDuplicateSectionBehavior / IniDuplicateKeyBehavior |
Bodu.Text.Ini |
The document-model duplicate policies (merge / disallow sections; last-wins / first-wins / disallow keys). |
IniFormatException / IniSerializationException |
Bodu.Text.Ini |
Failures split by cause: malformed input or policy violations vs. values that cannot be mapped. |
Utf8IniReader (+ IniReaderOptions) |
Bodu.Text.Ini.Reader |
Forward-only ref struct reader over the file as authored (source order, comments included). |
IniDocumentReader |
Bodu.Text.Ini.Reader |
Normalized cursor over the logical object-of-objects shape (globals hoisted, duplicate sections merged). |
Utf8IniWriter (+ IniWriterOptions) |
Bodu.Text.Ini.Writer |
Forward-only ref struct writer (section headers, entries, comment lines). |
IniDocument / IniElement / IniProperty |
Bodu.Text.Ini.Document |
Read-only, trivia-free document object model. |
IniNode / IniObject / IniValue |
Bodu.Text.Ini.Nodes |
Mutable, comment-preserving document object model: parse, edit, write back with the human's annotations intact. |
using Bodu.Text.Ini.Nodes;
IniObject root = IniNode.Parse(File.ReadAllBytes("app.ini"));
root["server"].AsObject()["port"].AsValue().Value = "9090";
File.WriteAllBytes("app.ini", root.ToUtf8Bytes()); // comments survive
The dialect is deliberately conservative: = only, values literal to end of line (inline ;/# is content), ; and # full-line comments, BOM and mixed line endings handled.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Bodu.Core (>= 1.0.0)
- Bodu.Text.Serialization (>= 1.0.0)
-
net8.0
- Bodu.Core (>= 1.0.0)
- Bodu.Text.Serialization (>= 1.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Bodu.Text.Ini:
| Package | Downloads |
|---|---|
|
Bodu.Text.Formats
Umbrella package for the Bodu line-oriented text formats on .NET 8 — delimited text (RFC 4180 CSV/TSV), DotEnv, and INI. References Bodu.Text.Delimited, Bodu.Text.DotEnv, and Bodu.Text.Ini, each a System.Text.Json-shaped library with a ref-struct Utf8 reader/writer pair, a serializer, a mutable node DOM, and a read-only document DOM. |
GitHub repositories
This package is not used by any popular GitHub repositories.