{"id":13590818,"url":"https://github.com/xoofx/Tomlyn","last_synced_at":"2025-04-08T14:31:51.691Z","repository":{"id":38713478,"uuid":"168931002","full_name":"xoofx/Tomlyn","owner":"xoofx","description":"Tomlyn is a TOML parser, validator and authoring library for .NET Framework and .NET Core","archived":false,"fork":false,"pushed_at":"2024-03-17T14:03:45.000Z","size":395,"stargazers_count":396,"open_issues_count":24,"forks_count":29,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-07-16T22:14:36.483Z","etag":null,"topics":["csharp","dotnet","dotnet-core","toml","toml-parser","toml-validation"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xoofx.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":".github/FUNDING.yml","license":"license.txt","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},"funding":{"github":["xoofx"]}},"created_at":"2019-02-03T09:54:12.000Z","updated_at":"2024-07-14T13:16:22.000Z","dependencies_parsed_at":"2024-02-17T08:31:46.235Z","dependency_job_id":null,"html_url":"https://github.com/xoofx/Tomlyn","commit_stats":{"total_commits":150,"total_committers":16,"mean_commits":9.375,"dds":0.5266666666666666,"last_synced_commit":"a4faf8c015d76f512481ba291700f1a077dad818"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xoofx%2FTomlyn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xoofx%2FTomlyn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xoofx%2FTomlyn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xoofx%2FTomlyn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xoofx","download_url":"https://codeload.github.com/xoofx/Tomlyn/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213548046,"owners_count":15603736,"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":["csharp","dotnet","dotnet-core","toml","toml-parser","toml-validation"],"created_at":"2024-08-01T16:00:50.790Z","updated_at":"2025-04-08T14:31:51.685Z","avatar_url":"https://github.com/xoofx.png","language":"C#","funding_links":["https://github.com/sponsors/xoofx"],"categories":["C# #"],"sub_categories":[],"readme":"# Tomlyn [![ci](https://github.com/xoofx/Tomlyn/actions/workflows/ci.yml/badge.svg)](https://github.com/xoofx/Tomlyn/actions/workflows/ci.yml)  [![Coverage Status](https://coveralls.io/repos/github/xoofx/Tomlyn/badge.svg?branch=main)](https://coveralls.io/github/xoofx/Tomlyn?branch=main)  [![NuGet](https://img.shields.io/nuget/v/Tomlyn.svg)](https://www.nuget.org/packages/Tomlyn/)\n\n\u003cimg align=\"right\" width=\"160px\" height=\"160px\" src=\"img/logo.png\"\u003e\n\nTomlyn is a [TOML](https://toml.io/en/) parser, validator and authoring library for .NET Framework and .NET Core.\n\n## What is TOML?\n\n\u003e **_A config file format for humans._**\n\u003e _TOML aims to be a minimal configuration file format that's easy to read due to obvious semantics. TOML is designed to map unambiguously to a hash table. TOML should be easy to parse into data structures in a wide variety of languages._\n\n- See the official website https://toml.io/en/ for more details.\n- Example and specifications are available at [TOML v1.0.0](https://toml.io/en/v1.0.0) \n\n## Features\n\n- Very fast parser, GC friendly.\n- Compatible with the latest [TOML v1.0.0 specs](https://toml.io/en/v1.0.0).\n- Allow to map a TOML string to a default runtime model via `Toml.ToModel(string)`\n- Allow to map a TOML string to a custom runtime model via `Toml.ToModel\u003cT\u003e(string)`\n  - Very convenient for loading custom configurations for example.\n- Allow to generate a TOML string from a runtime model via `string Toml.FromModel(object)`\n  - Preserve comments, by default with the default runtime model, or by implementing the `ITomlMetadataProvider`.\n- Allow to parse to a `DocumentSyntax` via `Toml.Parse(string)`.\n  - Preserve all spaces, new line, comments but also invalid characters/tokens.\n  - Can roundtrip to text with exact representation.\n- Provides a validator with the `Toml.Validate` method.\n- Supports for .NET Standard 2.0+ and provides an API with nullable annotations.\n\n## Documentation\n\nSee the [documentation](https://github.com/xoofx/Tomlyn/blob/main/doc/readme.md) for more details.\n\n## Install\n\nTomlyn is delivered as a [NuGet Package](https://www.nuget.org/packages/Tomlyn/).\n\n## Usage\n\n```c#\nvar toml = @\"global = \"\"this is a string\"\"\n# This is a comment of a table\n[my_table]\nkey = 1 # Comment a key\nvalue = true\nlist = [4, 5, 6]\n\";\n\n// Parse the TOML string to the default runtime model `TomlTable`\nvar model = Toml.ToModel(toml);\n// Fetch the string\nvar global = (string)model[\"global\"]!;\n// Prints: found global = \"this is a string\"\nConsole.WriteLine($\"found global = \\\"{global}\\\"\");\n// Generates a TOML string from the model\nvar tomlOut = Toml.FromModel(model);\n// Output the generated TOML\nConsole.WriteLine(tomlOut);\n```\n\nThis will print the original TOML by preserving most the comments:\n\n```toml\nglobal = \"this is a string\"\n# This is a comment of a table\n[my_table]\nkey = 1 # Comment a key\nvalue = true\nlist = [4, 5, 6]\n```\n\n\u003e NOTICE: By default, when mapping to a custom model, Tomlyn is using the PascalToSnakeCase naming convention (e.g `ThisIsFine` to `this_is_fine`).\n\u003e This behavior can be changed by overriding the `TomlModelOptions.ConvertPropertyName` delegate.\n\n## License\n\nThis software is released under the [BSD-Clause 2 license](https://opensource.org/licenses/BSD-2-Clause). \n\n## Credits\n\nModified version of the logo `Thor` by [Mike Rowe](https://thenounproject.com/itsmikerowe/) from the Noun Project (Creative Commons)\n\n## Author\n\nAlexandre Mutel aka [xoofx](http://xoofx.github.io).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxoofx%2FTomlyn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxoofx%2FTomlyn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxoofx%2FTomlyn/lists"}