跳到正文
cccskills
免费在 GitHub 公开

tomlyn

how to use Tomlyn for serialization and deserialization of TOML files in C#

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(10)

  • SKILL.md2.2 KB
  • docs/compatibility.md2.6 KB
  • docs/dom.md6.9 KB
  • docs/getting-started.md4.9 KB
  • docs/low-level.md10.7 KB
  • docs/migration.md6.1 KB
  • docs/performance.md3.2 KB
  • docs/readme.md2.1 KB
  • docs/serialization.md31.6 KB
  • docs/source-generation.md9.8 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Tomlyn is a high-performance TOML 1.1 library for .NET, shaped like System.Text.Json. It provides two main layers:

  • Object serialization - TomlSerializer maps TOML documents to .NET objects (POCOs, records, dictionaries) and back. Supports reflection and source generation. Does not preserve comments or formatting.
  • Low-level parsing - TomlLexer, TomlParser, and SyntaxParser provide token streams, incremental events, and a full-fidelity syntax tree for tooling, analyzers, and formatters that need to preserve every character.

Where to start

ScenarioStart here
New to TomlynGetting started
Familiar with System.Text.JsonSerialization - the API shape is intentionally similar
Need NativeAOT / trimmingSource generation
Want a dynamic model (no POCOs)DOM model - TomlTable, TomlArray
Building tooling (formatters, analyzers)Low-level APIs - SyntaxParser
Migrating from Tomlyn v0.xMigration guide

Key concepts

[!IMPORTANT] Tomlyn v1 targets TOML 1.1.0 only. It does not support TOML 1.0 or earlier drafts. See the official TOML v1.1.0 specification for the full language reference.

  • Diagnostics - parsing and mapping failures throw TomlException with precise source locations (Line, Column, Offset, Span).
  • Immutable options - TomlSerializerOptions is a sealed record; cache and reuse instances.
  • NativeAOT / trimming - use source generation (TomlSerializerContext) to avoid reflection. Reflection can be disabled via a feature switch.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

astro

免费

Reference for Astro — the core web framework the gatOS docs site (under site/) is built on. Use this when authoring or editing pages in site/, working with .astro/.md/.mdx files, content collections, the astro.config.mjs, or component/JSX-in-Markdown mechanics. Covers Astro component anatomy, using components in MDX, content collections, frontmatter, imports, expressions, and the build/dev commands — enough to work the site without leaving the repo. Pair with the `starlight` skill (the docs theme + its components) and the `tutorials` skill (the gatOS house style).

中文简介正在准备中。当前显示原文说明。

meow-sci/gatOS132026年10月11日 更新

bun

免费

how to use bun effectively for scripting and sqlite and more

中文简介正在准备中。当前显示原文说明。

meow-sci/gatOS132026年10月11日 更新

gatos

免费

Write scripts and programs against gatOS — the KSA mod that exposes live Kitten Space Agency simulation state as a 9P filesystem at /sim (also over HTTP /v1, MQTT, and an AI-oriented MCP server). Use this when asked to read game/celestial/vehicle telemetry, control vehicles (throttle, ignite, staging, attitude, burns, RCS, lights, docking), use game/debug controls (teleport, impulse kick, refuel, time-warp, switch vessel), direct the in-game camera / author cinematic shots and tracks, schedule timed command sequences, or write flight-computer / autopilot programs. Covers the full /sim catalog, the command model, KSA coordinate frames, and worked Bun/TypeScript + Rust examples.

中文简介正在准备中。当前显示原文说明。

meow-sci/gatOS132026年10月11日 更新

harmony

免费

Expert in use of Harmony Lib for runtime patching of dotnet C# code

中文简介正在准备中。当前显示原文说明。

meow-sci/gatOS132026年10月11日 更新

imgui

免费

ImGui is an immediate mode UI library. KSA uses ImGui for UI

中文简介正在准备中。当前显示原文说明。

meow-sci/gatOS132026年10月11日 更新

ksa

免费

detailed information about kitten space agency (KSA) game code, decompiled sources, modding patterns, architecture and best practices for working with mods and the game codebase

中文简介正在准备中。当前显示原文说明。

meow-sci/gatOS132026年10月11日 更新

查看 meow-sci 的全部技能

报告此技能的问题