[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79YABNRRMBAZ1HVZ0SB0FTG":3,"skill-same:01M79YABNRRMBAZ1HVZ0SB0FTG":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M79YABNRRMBAZ1HVZ0SB0FTG","system-text-json-net11",null,"Imperative guidance for the System.Text.Json APIs added in .NET 11: the built-in `JsonNamingPolicy.PascalCase` naming policy, and the strongly-typed generic `JsonSerializerOptions.GetTypeInfo` and `JsonSerializerOptions.TryGetTypeInfo` metadata accessors (generic overloads that return a typed `JsonTypeInfo`). USE ONLY when the user is targeting net11.0 or later and needs PascalCase JSON property or dictionary-key names without writing a custom naming policy, a strongly-typed generic `JsonTypeInfo` instead of the non-generic `JsonTypeInfo`, or a no-throw way to probe whether a type's serialization metadata is resolved. DO NOT USE when the target is earlier than net11.0, the requested behavior uses an established pre-net11 naming policy, or the user explicitly selected another JSON library.","Blind-Striker\u002Fagent-skills-and-plugins","Blind-Striker","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1965259?v=4","01M79WFXTE5PH0C1VB7B54ANMN","Deniz İrgin","01M79WFXV5KZ5GST1K8G035DM5",1,"MIT","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fplugins\u002Fdeniz-dotnet-general\u002Fskills\u002Fsystem-text-json-net11\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: system-text-json-net11\ndescription: >\n  Imperative guidance for the System.Text.Json APIs added in .NET 11: the\n  built-in `JsonNamingPolicy.PascalCase` naming policy, and the strongly-typed\n  generic `JsonSerializerOptions.GetTypeInfo` and\n  `JsonSerializerOptions.TryGetTypeInfo` metadata accessors (generic overloads\n  that return a typed `JsonTypeInfo`). USE ONLY when the user is targeting\n  net11.0 or later and needs PascalCase JSON property or dictionary-key names\n  without writing a custom naming policy, a strongly-typed generic\n  `JsonTypeInfo` instead of the non-generic `JsonTypeInfo`, or a no-throw way to\n  probe whether a type's serialization metadata is resolved. DO NOT USE when the\n  target is earlier than net11.0, the requested behavior uses an established\n  pre-net11 naming policy, or the user explicitly selected another JSON library.\nlicense: MIT\nuser-invocable: false\n---\n\n# System.Text.Json — .NET 11\n\nThree APIs were added to `System.Text.Json` in .NET 11. This skill tells you exactly\nwhen to reach for each one, what to write, what **not** to write, and how to prove the\nresult runs. Do not describe these APIs to the user — apply them. When the user asked for a\nrunnable sample, run it and show the output; in an existing project, build it and run its tests.\n\n| API | Replaces the pre-.NET-11 workaround of... |\n| --- | --- |\n| `JsonNamingPolicy.PascalCase` (static property) | writing a custom `JsonNamingPolicy` subclass or hand-annotating every member with `[JsonPropertyName]` |\n| `JsonSerializerOptions.GetTypeInfo\u003CT>()` | calling non-generic `GetTypeInfo(typeof(T))` and casting to `JsonTypeInfo\u003CT>` |\n| `JsonSerializerOptions.TryGetTypeInfo\u003CT>(out JsonTypeInfo\u003CT>? info)` | wrapping `GetTypeInfo` in `try`\u002F`catch` to probe availability |\n\n## Step 0 — Make the requested `net11.0` validation possible\n\nThese APIs only exist in the .NET 11 base class library. Before writing code:\n\n1. Run `dotnet --list-sdks` and confirm an SDK that can target `net11.0` is present — an\n   `11.x` SDK, or a later SDK with the `net11.0` targeting pack.\n2. If the user explicitly asks you to run the sample and no suitable SDK is installed,\n   use the official `dotnet-install` script to install the current .NET 11 SDK into a\n   temporary or project-local directory. Prefer the GA channel build. Use a preview only\n   when GA is not yet available or the user explicitly requested a preview. Do not require\n   administrator access, change the machine-wide `PATH`, or replace an installed SDK.\n3. Run the sample with that local `dotnet` executable. If download or execution is blocked,\n   still provide the complete `net11.0` program and report that it was **not run**. Never\n   substitute `net10.0`, a custom naming policy, or a different API and present that as\n   validation of the .NET 11 feature.\n\nUse the channel, not a guessed version. Try the GA channel first:\n\n```powershell\n$installScript = Join-Path $env:TEMP \"dotnet-install-$([guid]::NewGuid()).ps1\"\ntry {\n    Invoke-WebRequest -Uri 'https:\u002F\u002Fdot.net\u002Fv1\u002Fdotnet-install.ps1' -OutFile $installScript\n    & $installScript -Channel 11.0 -InstallDir .\\.dotnet\n    & .\\.dotnet\\dotnet.exe run --project \u003CPATH_TO_NET11_PROJECT>\n}\nfinally {\n    Remove-Item -LiteralPath $installScript -Force -ErrorAction SilentlyContinue\n}\n```\n\n```bash\ninstall_script=\"$(mktemp \"${TMPDIR:-\u002Ftmp}\u002Fdotnet-install.XXXXXX\")\"\ntrap 'rm -f \"$install_script\"' EXIT\ncurl -fsSL https:\u002F\u002Fdot.net\u002Fv1\u002Fdotnet-install.sh -o \"$install_script\"\nbash \"$install_script\" --channel 11.0 --install-dir .\u002F.dotnet\n.\u002F.dotnet\u002Fdotnet run --project \u003CPATH_TO_NET11_PROJECT>\n```\n\nBefore .NET 11 GA, retry the install with `-Quality preview` (PowerShell) or\n`--quality preview` (shell).\n\n## Decision table — symptom → do this → never do this\n\nMatch the user's request to a row, apply the **Do this** cell verbatim, and confirm the\n**Verify** column before you are done.\n\n| User asks for… | Do this (on `net11.0`) | Never do this | Verify |\n| --- | --- | --- | --- |\n| PascalCase JSON property names | `options.PropertyNamingPolicy = JsonNamingPolicy.PascalCase;` | define `class …: JsonNamingPolicy`; add per-member `[JsonPropertyName]`; string-case the names yourself | output JSON keys are PascalCase — e.g. `\"Name\"`, `\"Age\"` |\n| PascalCase dictionary keys | `options.DictionaryKeyPolicy = JsonNamingPolicy.PascalCase;` | set only `PropertyNamingPolicy`; pre-transform the dictionary; define a custom policy | dictionary keys such as `pendingOrders` become `\"PendingOrders\"` |\n| Strongly-typed metadata `JsonTypeInfo\u003CT>` | set `TypeInfoResolver = new DefaultJsonTypeInfoResolver()`, then `JsonTypeInfo\u003CT> ti = options.GetTypeInfo\u003CT>();` | `(JsonTypeInfo\u003CT>)options.GetTypeInfo(typeof(T))` | variable is typed `JsonTypeInfo\u003CT>`, no cast |\n| Probe whether metadata is resolved | `if (options.TryGetTypeInfo\u003CT>(out var ti)) { … } else { … }` | `try { options.GetTypeInfo\u003CT>(); } catch (…) { … }` | no `try`\u002F`catch`; both branches handled |\n\n## Rule 1 — PascalCase property names\n\n**When** the user wants JSON output whose property names are PascalCase (`Name`, `Age`)\nand asks for the built-in \u002F framework-provided way:\n\n1. Create or reuse a `JsonSerializerOptions` and set\n   `PropertyNamingPolicy = JsonNamingPolicy.PascalCase`.\n2. Serialize with those options.\n\nDo **not** write a `JsonNamingPolicy` subclass, do **not** add `[JsonPropertyName(\"…\")]`\nattributes to force casing, and do **not** upper-case the first letter of each name by\nhand. `JsonNamingPolicy.PascalCase` is the single correct answer on .NET 11.\n\n```csharp\n\u002F\u002F Console project (reflection enabled by default). To run this as a file-based app\n\u002F\u002F (dotnet run app.cs), also set TypeInfoResolver = new DefaultJsonTypeInfoResolver()\n\u002F\u002F — see \"Producing runnable output\" below.\nusing System.Text.Json;\n\nvar options = new JsonSerializerOptions\n{\n    PropertyNamingPolicy = JsonNamingPolicy.PascalCase\n};\nstring json = JsonSerializer.Serialize(new { name = \"Jane\", age = 30 }, options);\nConsole.WriteLine(json);\n\u002F\u002F {\"Name\":\"Jane\",\"Age\":30}\n```\n\n### Dictionary keys are a separate setting\n\n`PropertyNamingPolicy` does not transform `Dictionary\u003Cstring, TValue>` keys. For that\nrequest, set `DictionaryKeyPolicy`:\n\n```csharp\nvar options = new JsonSerializerOptions\n{\n    DictionaryKeyPolicy = JsonNamingPolicy.PascalCase\n};\nvar values = new Dictionary\u003Cstring, int>\n{\n    [\"pendingOrders\"] = 2,\n    [\"activeUsers\"] = 5\n};\nConsole.WriteLine(JsonSerializer.Serialize(values, options));\n\u002F\u002F {\"PendingOrders\":2,\"ActiveUsers\":5}\n```\n\n## Rule 2 — Strongly-typed `JsonTypeInfo\u003CT>`\n\n**When** the user wants type metadata back as `JsonTypeInfo\u003CT>` (not the non-generic\n`JsonTypeInfo` that needs a cast):\n\n1. Call `options.GetTypeInfo\u003CT>()` — it returns `JsonTypeInfo\u003CT>` directly.\n2. Assign it to a `JsonTypeInfo\u003CT>` variable and use it (e.g. pass it to\n   `JsonSerializer.Serialize`\u002F`Deserialize`).\n\nDo **not** call the non-generic `GetTypeInfo(Type)` overload and cast the result.\n\n> **Requires a resolver.** `GetTypeInfo\u003CT>()` throws `NotSupportedException`\n> (`NoMetadataForType`) unless the options have a `TypeInfoResolver` — set\n> `TypeInfoResolver = new DefaultJsonTypeInfoResolver()` for reflection-based apps, or use\n> a source-generated `JsonSerializerContext` for trimmed\u002FAOT apps.\n\n```csharp\n\u002F\u002F File-based app (run: dotnet run app.cs). In a .csproj project, remove this line and\n\u002F\u002F set \u003CTargetFramework>net11.0\u003C\u002FTargetFramework> in the project file instead.\n#:property TargetFramework=net11.0\n\nusing System.Text.Json;\nusing System.Text.Json.Serialization.Metadata;\n\nvar options = new JsonSerializerOptions\n{\n    TypeInfoResolver = new DefaultJsonTypeInfoResolver()\n};\n\nJsonTypeInfo\u003CPerson> typeInfo = options.GetTypeInfo\u003CPerson>();\nConsole.WriteLine(typeInfo.Type.Name); \u002F\u002F Person\n\nrecord Person(string Name, int Age);\n```\n\n## Rule 3 — Probe metadata without throwing\n\n**When** the user wants to check whether metadata for `T` is available and branch on it —\n*without* an exception being thrown when it is not:\n\n1. Call `options.TryGetTypeInfo\u003CT>(out var info)`.\n2. Handle the `true` branch (metadata resolved, use `info`) and the `false` branch\n   (not resolved) explicitly.\n\nDo **not** wrap `GetTypeInfo\u003CT>()` in `try`\u002F`catch` to detect the missing case — that is\nexactly the anti-pattern this API removes. `TryGetTypeInfo\u003CT>` returns `false` (instead of\nthrowing) when no resolver can produce metadata for `T`, which is precisely the case you\nwant to branch on.\n\n```csharp\n\u002F\u002F File-based app (run: dotnet run app.cs). In a .csproj project, remove this line and\n\u002F\u002F set \u003CTargetFramework>net11.0\u003C\u002FTargetFramework> in the project file instead.\n#:property TargetFramework=net11.0\n\nusing System.Text.Json;\nusing System.Text.Json.Serialization.Metadata;\n\n\u002F\u002F Configured with a resolver → metadata is available.\nvar configured = new JsonSerializerOptions\n{\n    TypeInfoResolver = new DefaultJsonTypeInfoResolver()\n};\nif (configured.TryGetTypeInfo\u003CPerson>(out JsonTypeInfo\u003CPerson>? info) && info is not null)\n{\n    Console.WriteLine($\"Resolved: {info.Type.Name}\"); \u002F\u002F Resolved: Person\n}\nelse\n{\n    Console.WriteLine(\"Type info not available\");\n}\n\n\u002F\u002F No resolver → TryGetTypeInfo returns false instead of throwing.\nvar empty = new JsonSerializerOptions();\nConsole.WriteLine(empty.TryGetTypeInfo\u003CPerson>(out _)); \u002F\u002F False\n\nrecord Person(string Name, int Age);\n```\n\n## Producing runnable output on `net11.0`\n\nWhen the user asked for a runnable sample, the task is not done until the program runs on\n`net11.0` and prints its JSON; in an existing project, the build and its tests are the proof. Prefer a\nconsole **project** — reflection-based serialization works there out of the box. A\nfile-based app also works but has one important caveat (below).\n\nWhen the installed SDK cannot target `net11.0` and execution was requested, install an\nSDK locally with the official script and invoke it by full path. The install script is\nnon-administrative and does not persistently alter `PATH`.\n\n### Option A — console project (recommended)\n\nCreate a project whose `.csproj` contains `\u003CTargetFramework>net11.0\u003C\u002FTargetFramework>`,\nput the code in `Program.cs`, then run `dotnet run`. Confirm the process exits with code 0\nand prints the expected JSON.\n\n```csharp\nusing System.Text.Json;\n\nvar options = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.PascalCase };\nConsole.WriteLine(JsonSerializer.Serialize(new { name = \"Jane\", age = 30 }, options));\n\u002F\u002F {\"Name\":\"Jane\",\"Age\":30}\n```\n\n### Option B — file-based app (quickest, one caveat)\n\nSave as `app.cs`, then run `dotnet run app.cs`; the first directive pins the framework.\n\n> **Caveat — file-based apps disable System.Text.Json reflection.** In a `dotnet run app.cs`\n> file-based app, `JsonSerializer.IsReflectionEnabledByDefault` is `false`, so plain\n> reflection serialization throws `NotSupportedException` (`NoMetadataForType`). Set an\n> explicit `TypeInfoResolver = new DefaultJsonTypeInfoResolver()` on the options (as below),\n> or use a source-generated `JsonSerializerContext`. A regular project does **not** need this.\n\n```csharp\n\u002F\u002F File-based app (run: dotnet run app.cs). In a .csproj project, remove this line and\n\u002F\u002F set \u003CTargetFramework>net11.0\u003C\u002FTargetFramework> in the project file instead.\n#:property TargetFramework=net11.0\n\nusing System.Text.Json;\nusing System.Text.Json.Serialization.Metadata;\n\nvar options = new JsonSerializerOptions\n{\n    PropertyNamingPolicy = JsonNamingPolicy.PascalCase,\n    TypeInfoResolver = new DefaultJsonTypeInfoResolver()\n};\nConsole.WriteLine(JsonSerializer.Serialize(new { name = \"Jane\", age = 30 }, options));\n\u002F\u002F {\"Name\":\"Jane\",\"Age\":30}\n```\n\n## Worked example — serialize with typed metadata + PascalCase\n\nThe record below uses lowercase member names on purpose, so the PascalCase policy\nvisibly rewrites them in the output:\n\n```csharp\n\u002F\u002F File-based app (run: dotnet run app.cs). In a .csproj project, remove this line and\n\u002F\u002F set \u003CTargetFramework>net11.0\u003C\u002FTargetFramework> in the project file instead.\n#:property TargetFramework=net11.0\n\nusing System.Text.Json;\nusing System.Text.Json.Serialization.Metadata;\n\nvar options = new JsonSerializerOptions\n{\n    PropertyNamingPolicy = JsonNamingPolicy.PascalCase,\n    TypeInfoResolver = new DefaultJsonTypeInfoResolver()\n};\n\nJsonTypeInfo\u003CPerson> typeInfo = options.GetTypeInfo\u003CPerson>();\nstring json = JsonSerializer.Serialize(new Person(\"Jane\", 30), typeInfo);\nConsole.WriteLine(json);\n\u002F\u002F {\"Name\":\"Jane\",\"Age\":30}\n\nrecord Person(string name, int age);\n```\n\n## Validation checklist\n\nBefore reporting success, confirm every applicable box:\n\n- [ ] The project or file-based app targets `net11.0` (visible in the `.csproj` or the\n      `#:property TargetFramework=net11.0` directive).\n- [ ] PascalCase requests use `JsonNamingPolicy.PascalCase` — no custom `JsonNamingPolicy`\n      subclass and no per-member `[JsonPropertyName]` attributes just to change casing.\n- [ ] Dictionary-key requests set `DictionaryKeyPolicy`, not only `PropertyNamingPolicy`.\n- [ ] Typed-metadata requests use the generic `GetTypeInfo\u003CT>()` — no cast of a\n      non-generic `JsonTypeInfo` — and the options set a `TypeInfoResolver` (e.g.\n      `DefaultJsonTypeInfoResolver`) so the call doesn't throw `NoMetadataForType`.\n- [ ] Probing requests use `TryGetTypeInfo\u003CT>(out …)` — no `try`\u002F`catch` around\n      `GetTypeInfo`.\n- [ ] The program was actually run (`dotnet run …`), exited 0, and its printed JSON shows\n      the expected property names (e.g. `\"Name\"`, `\"Age\"`).\n- [ ] If a **file-based app** (`dotnet run app.cs`) is used, every `JsonSerializerOptions`\n      sets a `TypeInfoResolver` — file-based apps disable reflection so plain serialization\n      throws `NoMetadataForType` without one.\n\n## Common pitfalls\n\n| Pitfall | Fix |\n| --- | --- |\n| Hand-rolling a `class … : JsonNamingPolicy` for PascalCase | Delete it; set `PropertyNamingPolicy = JsonNamingPolicy.PascalCase`. |\n| Adding `[JsonPropertyName(\"Name\")]` to every member to force casing | Remove the attributes; the naming policy handles all members at once. |\n| Casting `(JsonTypeInfo\u003CT>)options.GetTypeInfo(typeof(T))` | Call the generic `options.GetTypeInfo\u003CT>()`; no cast needed. |\n| `try { options.GetTypeInfo\u003CT>(); } catch (…) { … }` to test availability | Replace with `if (options.TryGetTypeInfo\u003CT>(out var info)) { … }`. |\n| `NotSupportedException` \u002F `NoMetadataForType` from `GetTypeInfo\u003CT>()` | The options have no resolver. Set `TypeInfoResolver = new DefaultJsonTypeInfoResolver()` (reflection) or a source-generated `JsonSerializerContext` (trim\u002FAOT). |\n| `NoMetadataForType` even for a plain `Serialize` in a `dotnet run app.cs` file-based app | File-based apps disable STJ reflection. Add `TypeInfoResolver = new DefaultJsonTypeInfoResolver()`, or run it as a normal project instead. |\n| Leaving the app on the SDK's default TFM | Pin `net11.0` explicitly so the .NET 11 APIs resolve and the output shows the target. |\n| Claiming success without running | Run `dotnet run` and paste the actual JSON output; the target is a working, executed program. |\n\n## More info\n\n- [JsonNamingPolicy class](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Fsystem.text.json.jsonnamingpolicy) — built-in naming policies including `PascalCase`\n- [JsonSerializerOptions.GetTypeInfo](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Fsystem.text.json.jsonserializeroptions.gettypeinfo) — typed and non-typed metadata access\n- [JsonTypeInfo\\\u003CT\\>](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Fsystem.text.json.serialization.metadata.jsontypeinfo-1) — strongly-typed serialization metadata\n- [DefaultJsonTypeInfoResolver](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Fsystem.text.json.serialization.metadata.defaultjsontypeinforesolver) — reflection-based resolver required by `GetTypeInfo`\u002F`TryGetTypeInfo`\n- [File-based apps](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fcore\u002Fsdk\u002Ffile-based-apps) — `dotnet run app.cs` and the `#:property` directive\n","# System.Text.Json — .NET 11\n\nThree APIs were added to `System.Text.Json` in .NET 11. This skill tells you exactly\nwhen to reach for each one, what to write, what **not** to write, and how to prove the\nresult runs. Do not describe these APIs to the user — apply them. When the user asked for a\nrunnable sample, run it and show the output; in an existing project, build it and run its tests.\n\n| API | Replaces the pre-.NET-11 workaround of... |\n| --- | --- |\n| `JsonNamingPolicy.PascalCase` (static property) | writing a custom `JsonNamingPolicy` subclass or hand-annotating every member with `[JsonPropertyName]` |\n| `JsonSerializerOptions.GetTypeInfo\u003CT>()` | calling non-generic `GetTypeInfo(typeof(T))` and casting to `JsonTypeInfo\u003CT>` |\n| `JsonSerializerOptions.TryGetTypeInfo\u003CT>(out JsonTypeInfo\u003CT>? info)` | wrapping `GetTypeInfo` in `try`\u002F`catch` to probe availability |\n\n## Step 0 — Make the requested `net11.0` validation possible\n\nThese APIs only exist in the .NET 11 base class library. Before writing code:\n\n1. Run `dotnet --list-sdks` and confirm an SDK that can target `net11.0` is present — an\n   `11.x` SDK, or a later SDK with the `net11.0` targeting pack.\n2. If the user explicitly asks you to run the sample and no suitable SDK is installed,\n   use the official `dotnet-install` script to install the current .NET 11 SDK into a\n   temporary or project-local directory. Prefer the GA channel build. Use a preview only\n   when GA is not yet available or the user explicitly requested a preview. Do not require\n   administrator access, change the machine-wide `PATH`, or replace an installed SDK.\n3. Run the sample with that local `dotnet` executable. If download or execution is blocked,\n   still provide the complete `net11.0` program and report that it was **not run**. Never\n   substitute `net10.0`, a custom naming policy, or a different API and present that as\n   validation of the .NET 11 feature.\n\nUse the channel, not a guessed version. Try the GA channel first:\n\n```powershell\n$installScript = Join-Path $env:TEMP \"dotnet-install-$([guid]::NewGuid()).ps1\"\ntry {\n    Invoke-WebRequest -Uri 'https:\u002F\u002Fdot.net\u002Fv1\u002Fdotnet-install.ps1' -OutFile $installScript\n    & $installScript -Channel 11.0 -InstallDir .\\.dotnet\n    & .\\.dotnet\\dotnet.exe run --project \u003CPATH_TO_NET11_PROJECT>\n}\nfinally {\n    Remove-Item -LiteralPath $installScript -Force -ErrorAction SilentlyContinue\n}\n```\n\n```bash\ninstall_script=\"$(mktemp \"${TMPDIR:-\u002Ftmp}\u002Fdotnet-install.XXXXXX\")\"\ntrap 'rm -f \"$install_script\"' EXIT\ncurl -fsSL https:\u002F\u002Fdot.net\u002Fv1\u002Fdotnet-install.sh -o \"$install_script\"\nbash \"$install_script\" --channel 11.0 --install-dir .\u002F.dotnet\n.\u002F.dotnet\u002Fdotnet run --project \u003CPATH_TO_NET11_PROJECT>\n```\n\nBefore .NET 11 GA, retry the install with `-Quality preview` (PowerShell) or\n`--quality preview` (shell).\n\n## Decision table — symptom → do this → never do this\n\nMatch the user's request to a row, apply the **Do this** cell verbatim, and confirm the\n**Verify** column before you are done.\n\n| User asks for… | Do this (on `net11.0`) | Never do this | Verify |\n| --- | --- | --- | --- |\n| PascalCase JSON property names | `options.PropertyNamingPolicy = JsonNamingPolicy.PascalCase;` | define `class …: JsonNamingPolicy`; add per-member `[JsonPropertyName]`; string-case the names yourself | output JSON keys are PascalCase — e.g. `\"Name\"`, `\"Age\"` |\n| PascalCase dictionary keys | `options.DictionaryKeyPolicy = JsonNamingPolicy.PascalCase;` | set only `PropertyNamingPolicy`; pre-transform the dictionary; define a custom policy | dictionary keys such as `pendingOrders` become `\"PendingOrders\"` |\n| Strongly-typed metadata `JsonTypeInfo\u003CT>` | set `TypeInfoResolver = new DefaultJsonTypeInfoResolver()`, then `JsonTypeInfo\u003CT> ti = options.GetTypeInfo\u003CT>();` | `(JsonTypeInfo\u003CT>)options.GetTypeInfo(typeof(T))` | variable is typed `JsonTypeInfo\u003CT>`, no cast |\n| Probe whether metadata is resolved | `if (options.TryGetTypeInfo\u003CT>(out var ti)) { … } else { … }` | `try { options.GetTypeInfo\u003CT>(); } catch (…) { … }` | no `try`\u002F`catch`; both branches handled |\n\n## Rule 1 — PascalCase property names\n\n**When** the user wants JSON output whose property names are PascalCase (`Name`, `Age`)\nand asks for the built-in \u002F framework-provided way:\n\n1. Create or reuse a `JsonSerializerOptions` and set\n   `PropertyNamingPolicy = JsonNamingPolicy.PascalCase`.\n2. Serialize with those options.\n\nDo **not** write a `JsonNamingPolicy` subclass, do **not** add `[JsonPropertyName(\"…\")]`\nattributes to force casing, and do **not** upper-case the first letter of each name by\nhand. `JsonNamingPolicy.PascalCase` is the single correct answer on .NET 11.\n\n```csharp\n\u002F\u002F Console project (reflection enabled by default). To run this as a file-based app\n\u002F\u002F (dotnet run app.cs), also set TypeInfoResolver = new DefaultJsonTypeInfoResolver()\n\u002F\u002F — see \"Producing runnable output\" below.\nusing System.Text.Json;\n\nvar options = new JsonSerializerOptions\n{\n    PropertyNamingPolicy = JsonNamingPolicy.PascalCase\n};\nstring json = JsonSerializer.Serialize(new { name = \"Jane\", age = 30 }, options);\nConsole.WriteLine(json);\n\u002F\u002F {\"Name\":\"Jane\",\"Age\":30}\n```\n\n### Dictionary keys are a separate setting\n\n`PropertyNamingPolicy` does not transform `Dictionary\u003Cstring, TValue>` keys. For that\nrequest, set `DictionaryKeyPolicy`:\n\n```csharp\nvar options = new JsonSerializerOptions\n{\n    DictionaryKeyPolicy = JsonNamingPolicy.PascalCase\n};\nvar values = new Dictionary\u003Cstring, int>\n{\n    [\"pendingOrders\"] = 2,\n    [\"activeUsers\"] = 5\n};\nConsole.WriteLine(JsonSerializer.Serialize(values, options));\n\u002F\u002F {\"PendingOrders\":2,\"ActiveUsers\":5}\n```\n\n## Rule 2 — Strongly-typed `JsonTypeInfo\u003CT>`\n\n**When** the user wants type metadata back as `JsonTypeInfo\u003CT>` (not the non-generic\n`JsonTypeInfo` that needs a cast):\n\n1. Call `options.GetTypeInfo\u003CT>()` — it returns `JsonTypeInfo\u003CT>` directly.\n2. Assign it to a `JsonTypeInfo\u003CT>` variable and use it (e.g. pass it to\n   `JsonSerializer.Serialize`\u002F`Deserialize`).\n\nDo **not** call the non-generic `GetTypeInfo(Type)` overload and cast the result.\n\n> **Requires a resolver.** `GetTypeInfo\u003CT>()` throws `NotSupportedException`\n> (`NoMetadataForType`) unless the options have a `TypeInfoResolver` — set\n> `TypeInfoResolver = new DefaultJsonTypeInfoResolver()` for reflection-based apps, or use\n> a source-generated `JsonSerializerContext` for trimmed\u002FAOT apps.\n\n```csharp\n\u002F\u002F File-based app (run: dotnet run app.cs). In a .csproj project, remove this line and\n\u002F\u002F set \u003CTargetFramework>net11.0\u003C\u002FTargetFramework> in the project file instead.\n#:property TargetFramework=net11.0\n\nusing System.Text.Json;\nusing System.Text.Json.Serialization.Metadata;\n\nvar options = new JsonSerializerOptions\n{\n    TypeInfoResolver = new DefaultJsonTypeInfoResolver()\n};\n\nJsonTypeInfo\u003CPerson> typeInfo = options.GetTypeInfo\u003CPerson>();\nConsole.WriteLine(typeInfo.Type.Name); \u002F\u002F Person\n\nrecord Person(string Name, int Age);\n```\n\n## Rule 3 — Probe metadata without throwing\n\n**When** the user wants to check whether metadata for `T` is available and branch on it —\n*without* an exception being thrown when it is not:\n\n1. Call `options.TryGetTypeInfo\u003CT>(out var info)`.\n2. Handle the `true` branch (metadata resolved, use `info`) and the `false` branch\n   (not resolved) explicitly.\n\nDo **not** wrap `GetTypeInfo\u003CT>()` in `try`\u002F`catch` to detect the missing case — that is\nexactly the anti-pattern this API removes. `TryGetTypeInfo\u003CT>` returns `false` (instead of\nthrowing) when no resolver can produce metadata for `T`, which is precisely the case you\nwant to branch on.\n\n```csharp\n\u002F\u002F File-based app (run: dotnet run app.cs). In a .csproj project, remove this line and\n\u002F\u002F set \u003CTargetFramework>net11.0\u003C\u002FTargetFramework> in the project file instead.\n#:property TargetFramework=net11.0\n\nusing System.Text.Json;\nusing System.Text.Json.Serialization.Metadata;\n\n\u002F\u002F Configured with a resolver → metadata is available.\nvar configured = new JsonSerializerOptions\n{\n    TypeInfoResolver = new DefaultJsonTypeInfoResolver()\n};\nif (configured.TryGetTypeInfo\u003CPerson>(out JsonTypeInfo\u003CPerson>? info) && info is not null)\n{\n    Console.WriteLine($\"Resolved: {info.Type.Name}\"); \u002F\u002F Resolved: Person\n}\nelse\n{\n    Console.WriteLine(\"Type info not available\");\n}\n\n\u002F\u002F No resolver → TryGetTypeInfo returns false instead of throwing.\nvar empty = new JsonSerializerOptions();\nConsole.WriteLine(empty.TryGetTypeInfo\u003CPerson>(out _)); \u002F\u002F False\n\nrecord Person(string Name, int Age);\n```\n\n## Producing runnable output on `net11.0`\n\nWhen the user asked for a runnable sample, the task is not done until the program runs on\n`net11.0` and prints its JSON; in an existing project, the build and its tests are the proof. Prefer a\nconsole **project** — reflection-based serialization works there out of the box. A\nfile-based app also works but has one important caveat (below).\n\nWhen the installed SDK cannot target `net11.0` and execution was requested, install an\nSDK locally with the official script and invoke it by full path. The install script is\nnon-administrative and does not persistently alter `PATH`.\n\n### Option A — console project (recommended)\n\nCreate a project whose `.csproj` contains `\u003CTargetFramework>net11.0\u003C\u002FTargetFramework>`,\nput the code in `Program.cs`, then run `dotnet run`. Confirm the process exits with code 0\nand prints the expected JSON.\n\n```csharp\nusing System.Text.Json;\n\nvar options = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.PascalCase };\nConsole.WriteLine(JsonSerializer.Serialize(new { name = \"Jane\", age = 30 }, options));\n\u002F\u002F {\"Name\":\"Jane\",\"Age\":30}\n```\n\n### Option B — file-based app (quickest, one caveat)\n\nSave as `app.cs`, then run `dotnet run app.cs`; the first directive pins the framework.\n\n> **Caveat — file-based apps disable System.Text.Json reflection.** In a `dotnet run app.cs`\n> file-based app, `JsonSerializer.IsReflectionEnabledByDefault` is `false`, so plain\n> reflection serialization throws `NotSupportedException` (`NoMetadataForType`). Set an\n> explicit `TypeInfoResolver = new DefaultJsonTypeInfoResolver()` on the options (as below),\n> or use a source-generated `JsonSerializerContext`. A regular project does **not** need this.\n\n```csharp\n\u002F\u002F File-based app (run: dotnet run app.cs). In a .csproj project, remove this line and\n\u002F\u002F set \u003CTargetFramework>net11.0\u003C\u002FTargetFramework> in the project file instead.\n#:property TargetFramework=net11.0\n\nusing System.Text.Json;\nusing System.Text.Json.Serialization.Metadata;\n\nvar options = new JsonSerializerOptions\n{\n    PropertyNamingPolicy = JsonNamingPolicy.PascalCase,\n    TypeInfoResolver = new DefaultJsonTypeInfoResolver()\n};\nConsole.WriteLine(JsonSerializer.Serialize(new { name = \"Jane\", age = 30 }, options));\n\u002F\u002F {\"Name\":\"Jane\",\"Age\":30}\n```\n\n## Worked example — serialize with typed metadata + PascalCase\n\nThe record below uses lowercase member names on purpose, so the PascalCase policy\nvisibly rewrites them in the output:\n\n```csharp\n\u002F\u002F File-based app (run: dotnet run app.cs). In a .csproj project, remove this line and\n\u002F\u002F set \u003CTargetFramework>net11.0\u003C\u002FTargetFramework> in the project file instead.\n#:property TargetFramework=net11.0\n\nusing System.Text.Json;\nusing System.Text.Json.Serialization.Metadata;\n\nvar options = new JsonSerializerOptions\n{\n    PropertyNamingPolicy = JsonNamingPolicy.PascalCase,\n    TypeInfoResolver = new DefaultJsonTypeInfoResolver()\n};\n\nJsonTypeInfo\u003CPerson> typeInfo = options.GetTypeInfo\u003CPerson>();\nstring json = JsonSerializer.Serialize(new Person(\"Jane\", 30), typeInfo);\nConsole.WriteLine(json);\n\u002F\u002F {\"Name\":\"Jane\",\"Age\":30}\n\nrecord Person(string name, int age);\n```\n\n## Validation checklist\n\nBefore reporting success, confirm every applicable box:\n\n- [ ] The project or file-based app targets `net11.0` (visible in the `.csproj` or the\n      `#:property TargetFramework=net11.0` directive).\n- [ ] PascalCase requests use `JsonNamingPolicy.PascalCase` — no custom `JsonNamingPolicy`\n      subclass and no per-member `[JsonPropertyName]` attributes just to change casing.\n- [ ] Dictionary-key requests set `DictionaryKeyPolicy`, not only `PropertyNamingPolicy`.\n- [ ] Typed-metadata requests use the generic `GetTypeInfo\u003CT>()` — no cast of a\n      non-generic `JsonTypeInfo` — and the options set a `TypeInfoResolver` (e.g.\n      `DefaultJsonTypeInfoResolver`) so the call doesn't throw `NoMetadataForType`.\n- [ ] Probing requests use `TryGetTypeInfo\u003CT>(out …)` — no `try`\u002F`catch` around\n      `GetTypeInfo`.\n- [ ] The program was actually run (`dotnet run …`), exited 0, and its printed JSON shows\n      the expected property names (e.g. `\"Name\"`, `\"Age\"`).\n- [ ] If a **file-based app** (`dotnet run app.cs`) is used, every `JsonSerializerOptions`\n      sets a `TypeInfoResolver` — file-based apps disable reflection so plain serialization\n      throws `NoMetadataForType` without one.\n\n## Common pitfalls\n\n| Pitfall | Fix |\n| --- | --- |\n| Hand-rolling a `class … : JsonNamingPolicy` for PascalCase | Delete it; set `PropertyNamingPolicy = JsonNamingPolicy.PascalCase`. |\n| Adding `[JsonPropertyName(\"Name\")]` to every member to force casing | Remove the attributes; the naming policy handles all members at once. |\n| Casting `(JsonTypeInfo\u003CT>)options.GetTypeInfo(typeof(T))` | Call the generic `options.GetTypeInfo\u003CT>()`; no cast needed. |\n| `try { options.GetTypeInfo\u003CT>(); } catch (…) { … }` to test availability | Replace with `if (options.TryGetTypeInfo\u003CT>(out var info)) { … }`. |\n| `NotSupportedException` \u002F `NoMetadataForType` from `GetTypeInfo\u003CT>()` | The options have no resolver. Set `TypeInfoResolver = new DefaultJsonTypeInfoResolver()` (reflection) or a source-generated `JsonSerializerContext` (trim\u002FAOT). |\n| `NoMetadataForType` even for a plain `Serialize` in a `dotnet run app.cs` file-based app | File-based apps disable STJ reflection. Add `TypeInfoResolver = new DefaultJsonTypeInfoResolver()`, or run it as a normal project instead. |\n| Leaving the app on the SDK's default TFM | Pin `net11.0` explicitly so the .NET 11 APIs resolve and the output shows the target. |\n| Claiming success without running | Run `dotnet run` and paste the actual JSON output; the target is a working, executed program. |\n\n## More info\n\n- [JsonNamingPolicy class](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Fsystem.text.json.jsonnamingpolicy) — built-in naming policies including `PascalCase`\n- [JsonSerializerOptions.GetTypeInfo](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Fsystem.text.json.jsonserializeroptions.gettypeinfo) — typed and non-typed metadata access\n- [JsonTypeInfo\\\u003CT\\>](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Fsystem.text.json.serialization.metadata.jsontypeinfo-1) — strongly-typed serialization metadata\n- [DefaultJsonTypeInfoResolver](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Fsystem.text.json.serialization.metadata.defaultjsontypeinforesolver) — reflection-based resolver required by `GetTypeInfo`\u002F`TryGetTypeInfo`\n- [File-based apps](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fcore\u002Fsdk\u002Ffile-based-apps) — `dotnet run app.cs` and the `#:property` directive\n",{"name":5,"license":15,"description":24,"user-invocable":20},"Imperative guidance for the System.Text.Json APIs added in .NET 11: the built-in `JsonNamingPolicy.PascalCase` naming policy, and the strongly-typed generic `JsonSerializerOptions.GetTypeInfo` and `JsonSerializerOptions.TryGetTypeInfo` metadata accessors (generic overloads that return a typed `JsonTypeInfo`). USE ONLY when the user is targeting net11.0 or later and needs PascalCase JSON property or dictionary-key names without writing a custom naming policy, a strongly-typed generic `JsonTypeInfo` instead of the non-generic `JsonTypeInfo`, or a no-throw way to probe whether a type's serialization metadata is resolved. DO NOT USE when the target is earlier than net11.0, the requested behavior uses an established pre-net11 naming policy, or the user explicitly selected another JSON library.\n","master","b30b1c1908dbc56a8184128f18803053d762ccb5","plugins\u002Fdeniz-dotnet-general\u002Fskills\u002Fsystem-text-json-net11",0,"https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins","https:\u002F\u002Fgithub.com\u002FBlind-Striker","denizirgin.com","VP of Engineering - \r\n@armutcom @homeruntech @prontopro\r\n |  Speaker \r\n@CodeFiction\r\n, http:\u002F\u002Fcodefiction.tech | Developer, gamer, blogger, maiden iron fan","2026-11-13 00:23:18",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add Blind-Striker\u002Fagent-skills-and-plugins --skill system-text-json-net11",{"tool":40,"command":41},"bunx","bunx skills add Blind-Striker\u002Fagent-skills-and-plugins --skill system-text-json-net11",{"tool":43,"command":44},"pnpm","pnpm dlx skills add Blind-Striker\u002Fagent-skills-and-plugins --skill system-text-json-net11","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fplugins\u002Fdeniz-dotnet-general\u002Fskills\u002Fsystem-text-json-net11\u002FSKILL.md",true,[],[49,56,63,70,77,84],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M79YGWBJ52PHMSTKJ3RJ3AWR","writing-tunit-tests","Write tests in TUnit — the attributes, the async assertion model, data-driven cases, lifecycle hooks, and the parallelism rules. USE FOR writing or fixing a test in a TUnit project, translating a test idea into TUnit syntax, or reviewing TUnit test code for API mistakes. DO NOT USE FOR deciding what to test, judging whether a test is any good, or running tests.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-dotnet-general\u002Fwriting-tunit-tests\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M79YGR3Y9RCRS6TD71D0KKP8","dotnet-walls","Walls for a .NET change in a repository without its own quality gates — pinned, ephemeral analyzer, format, clone and scanner commands for the verify step, their identity ratchet, and the build traps. Use during a walls preflight, or when a worker's verify step needs .NET quality gates.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-dotnet-general\u002Fdotnet-walls\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M79YGFNJBST7D803NQW3SBYM","csharp-15","Write, review and modernize C# 15 (.NET 11) code correctly. Covers every C# 15 feature - collection expression arguments (`[with(...), ...]`), union types (`union`, `[Union]`, `IUnion`, custom unions), closed class hierarchies (`closed`), extension indexers, labeled `break`\u002F`continue`, non-virtual static interface members on runtimes without default interface methods, and the preview memory-safety model (`unsafe(expr)`, `safe`, requires-unsafe members). Use when code targets net11.0 or LangVersion 15\u002Fpreview, when the user mentions any of these features, when replacing marker interfaces, OneOf-style results, `goto`\u002Fflag loop exits or capacity\u002Fcomparer boilerplate, or when the build reports CS8121, CS8509, CS8655, CS8510, CS0121\u002FCS0411 on a `with(...)` element, CS9370, CS9380 or CS9363.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-dotnet-general\u002Fcsharp-15\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M79YGAV031473HSX6FN87ENH","verified-waves","Run one task as verified multi-agent waves. Plans the fan-out, sends findings to fresh skeptics, keeps a ledger, and reports N of M done; small tasks stay solo.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-coordination\u002Fverified-waves\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M79YG6QXNND4WRPP3GATSY8J","harness","The bundled dispatch harness, which runs a task file on worker models through OpenCode or Codex, fences their writes, escalates their asks to the operator, settles each result from git and its verify commands, and records every step in a ledger. Its commands, task file, modes and write fence, configuration, runs and their recovery, ledger and exit codes.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-coordination\u002Fharness\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M79YG2P5S91SDTA5912XJ4FV","delegating-to-worker-models","Use when you hand off implementation, a plan, research a decision will rely on, or a review, and you brief the worker and check what comes back. A subagent that searches, reads in parallel, or keeps your context small is ordinary tool use. Covers what stays with you, the mechanism, assigning work by strength, the walls preflight, prompts without contradictions, the worker contract and model profiles, evidence from your own run, review, and the fix-up loop.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-coordination\u002Fdelegating-to-worker-models\u002FSKILL.md",[],[]]