What problem does it solve?
This Skill streamlines the serialization and deserialization of TOML files in C#, offering a fast and efficient way to convert between TOML and .NET data structures.
Core Features & Use Cases
- Object Serialization: Converts TOML documents to .NET objects and vice versa.
- Low-level Parsing: Provides access to the syntax tree and token stream for advanced use cases.
- Use Case: Suppose you have a configuration file in TOML format and you want to load it into a .NET application. This Skill can quickly parse the file and populate the necessary data structures.
Quick Start
To serialize an object, use the Tomlyn library as follows:
var serializer = new TomlSerializer();
var config = new ServerConfig { Host = "localhost", Port = 8080 };
var toml = serializer.Serialize(config);