system-text-json-net11

Implements new System.Text.Json APIs in .NET 11 for typed metadata access and PascalCase naming.

1|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/D1ssolve/craft-agents --skill system-text-json-net11-d1ssolve
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: system-text-json-net11
Source: https://github.com/D1ssolve/craft-agents/tree/main/skills/system-text-json-net11
Command: npx skills add https://github.com/D1ssolve/craft-agents --skill system-text-json-net11-d1ssolve

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers working with JSON serialization in .NET 11 need guidance on the new System.Text.Json APIs, including strongly-typed JsonTypeInfo access and the new PascalCase naming policy, without relying on untyped overloads or exception-based control flow. ## Core Features & Use Cases - Typed JsonTypeInfo Access: Use GetTypeInfo<T> and TryGetTypeInfo<T> on JsonSerializerOptions to retrieve strongly-typed metadata instead of untyped JsonTypeInfo overloads. - Safe Metadata Lookup: TryGetTypeInfo<T> lets you check whether type metadata is available without catching exceptions. - PascalCase Naming Policy: Apply the new static JsonNamingPolicy.PascalCase property to serialize property names in PascalCase. - Use Case: When building a .NET 11 web API that serializes records to JSON, use GetTypeInfo<Person> to obtain typed metadata and combine it with JsonNamingPolicy.PascalCase to produce output like {"Name":"Jane","Age":30}. ## Quick Start Ask the assistant to show how to serialize a C# record to PascalCase JSON using the new System.Text.Json APIs in .NET 11.

Frequently Asked Questions about system-text-json-net11

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get a typed JsonTypeInfo in .NET 11?

Call GetTypeInfo<T>() on JsonSerializerOptions to retrieve a strongly-typed JsonTypeInfo<T> using the options' configured type-info resolver. This replaces the untyped GetTypeInfo(Type) overload when you know the type at compile time.

How to check if JSON type metadata is available without exceptions?

Use TryGetTypeInfo<T>(out JsonTypeInfo<T>?) on JsonSerializerOptions. It returns a boolean indicating whether the metadata was resolved, letting you handle missing type info with a simple branch instead of try-catch blocks.

Does System.Text.Json support PascalCase property naming?

Yes, in .NET 11 System.Text.Json adds a static JsonNamingPolicy.PascalCase property. Assign it to JsonSerializerOptions.PropertyNamingPolicy to serialize property names in PascalCase, such as {"FirstName":"John"}.

Can I use GetTypeInfo<T> in .NET 10 or earlier?

No, the typed GetTypeInfo<T>, TryGetTypeInfo<T>, and JsonNamingPolicy.PascalCase APIs are only available starting in .NET 11. Projects targeting net10.0 or earlier must use the existing untyped GetTypeInfo(Type) overloads.

Does this guidance apply to Newtonsoft.Json?

No, these APIs are specific to System.Text.Json in .NET 11. Newtonsoft.Json has its own contract resolver and naming strategy mechanisms, so this guidance does not transfer to that library.