OfficeIMO.Reader.Toml 3.6.2

Prefix Reserved
dotnet add package OfficeIMO.Reader.Toml --version 3.6.2
                    
NuGet\Install-Package OfficeIMO.Reader.Toml -Version 3.6.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OfficeIMO.Reader.Toml" Version="3.6.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OfficeIMO.Reader.Toml" Version="3.6.2" />
                    
Directory.Packages.props
<PackageReference Include="OfficeIMO.Reader.Toml" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OfficeIMO.Reader.Toml --version 3.6.2
                    
#r "nuget: OfficeIMO.Reader.Toml, 3.6.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OfficeIMO.Reader.Toml@3.6.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OfficeIMO.Reader.Toml&version=3.6.2
                    
Install as a Cake Addin
#tool nuget:?package=OfficeIMO.Reader.Toml&version=3.6.2
                    
Install as a Cake Tool

OfficeIMO.Reader.Toml - TOML reader adapter

OfficeIMO.Reader.Toml adds TOML ingestion to OfficeIMO.Reader.Core through the OfficeIMO.Toml engine. It reads pyproject.toml, Cargo.toml, uv.lock, Hugo and other TOML 1.1 files into path, type and value rows.

Install

dotnet add package OfficeIMO.Reader.Toml

Configure

using OfficeIMO.Reader;
using OfficeIMO.Reader.Toml;

OfficeDocumentReader reader = new OfficeDocumentReaderBuilder()
    .AddTomlHandler(new TomlReadOptions { ChunkRows = 100 })
    .Build();

foreach (ReaderChunk chunk in reader.Enumerate("pyproject.toml")) {
    Console.WriteLine(chunk.Markdown);
}

AddAllOfficeIMOHandlers() from OfficeIMO.Reader.All registers it too, for .toml files.

Output

Every value becomes one row with three columns:

Column Content
Path The value's path, such as $.project.dependencies[0] or $.package[3].name. Keys that are not identifiers are quoted: $.tool.uv.sources["my.pkg"]. The grammar is the one TomlDocument.Select accepts, so a path can be fed back to edit the same value.
Type string, integer, float, boolean, datetime, datetime-local, date-local or time-local; empty tables and arrays appear as table ({}) and array ([]).
Value The decoded string, or the value as written for other types (0xFF, 1979-05-27).

Rows are emitted in document order, ChunkRows per chunk, with plain-text and Markdown table projections and the source lines each chunk covers. Projected into the neutral OfficeDocumentModel, for example for PDF output, a TOML result reports OfficeDocumentFormat.Toml.

Options

Option Default Meaning
ChunkRows 200 Rows per emitted chunk.
IncludeMarkdown true Adds a Markdown table projection to each chunk.
MaxDepth null (64) Maximum nesting of tables, arrays and inline tables, counting each key of a dotted key or header.
MaxNodes null (200,000) Maximum tables, arrays and values in the document.
MaxScalarLength null (1,048,576) Maximum source length of one string or key in UTF-16 code units, including its quotes (TomlLoadOptions.MaxStringLength).
LoadOptions null Engine settings used as the base for the limits above, and the place to set MaxInputBytes.

Limits and diagnostics

Limits start from LoadOptions, or from TomlLoadOptions.UntrustedDefaults when it is null; the defaults in brackets come from there. MaxDepth, MaxNodes and MaxScalarLength replace the matching base value when set, so new TomlReadOptions { LoadOptions = custom, MaxNodes = 500_000 } keeps the other values of custom. ReaderOptions.MaxInputBytes applies as well and wins when it is lower. Values below 1 throw ArgumentOutOfRangeException.

Exceeding a limit throws ReaderResourceLimitException whose LimitName is the TomlReadOptions property (MaxDepth, MaxNodes, MaxScalarLength) or MaxInputBytes, with the engine's TomlLimitExceededException, including its position, as InnerException. Raise the limit for trusted larger files. Invalid TOML produces a single warning chunk with the error code, line and column instead of throwing.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on OfficeIMO.Reader.Toml:

Package Downloads
OfficeIMO.Reader.All

Composition-only preset for registering OfficeIMO.Reader's local format adapters.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.6.2 61 11/18/2026