One-click install
npx skills add https://github.com/1k-off/umbraco-observability-playground --skill system-text-json-net11
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: system-text-json-net11
Source: https://github.com/1k-off/umbraco-observability-playground/tree/main/.agents/skills/system-text-json-net11
Command: npx skills add https://github.com/1k-off/umbraco-observability-playground --skill system-text-json-net11

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you access strongly-typed System.Text.Json metadata and apply .NET 11 naming behavior without relying on exception-driven, untyped APIs.

Core Features & Use Cases

  • Typed JsonTypeInfo<T> retrieval: Fetch strongly-typed serialization metadata for a specific type using GetTypeInfo<T>.
  • Safe metadata probing: Check whether type metadata is available without throwing by using TryGetTypeInfo<T>.
  • PascalCase property naming: Use JsonNamingPolicy.PascalCase to serialize object properties with PascalCase names, matching common API contracts.

Quick Start

Tell the AI: "Show me how to use JsonSerializerOptions.GetTypeInfo<T>() and JsonNamingPolicy.PascalCase in a .NET 11 Web project for serializing a record."

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 strongly-typed JsonTypeInfo in .NET 11 without throwing exceptions?

Use JsonSerializerOptions.GetTypeInfo<T>() to retrieve strongly-typed JsonTypeInfo<T> for JSON serialization. For safe probing, JsonSerializerOptions.TryGetTypeInfo<T>(out ...) checks metadata availability without throwing, replacing untyped APIs.

How do I enforce PascalCase property naming with System.Text.Json in .NET 11?

Apply JsonNamingPolicy.PascalCase to JsonSerializerOptions to serialize object properties with PascalCase names. This ensures consistent property naming across models matching common API contracts in .NET 11+ applications.

Does .NET 11 support typed metadata lookup for JSON serialization?

Yes, .NET 11 supports typed metadata lookup for JSON serialization. It provides type-safe access to resolve JsonTypeInfo<T> during serialization and deserialization, moving away from exception-driven access patterns.

When should I use TryGetTypeInfo<T> instead of GetTypeInfo<T> for JSON metadata?

Use JsonSerializerOptions.TryGetTypeInfo<T>(out ...) when you need to check whether type metadata is available without throwing exceptions. GetTypeInfo<T>() is better when you require the metadata and expect the type to be registered.

What is the best way to access System.Text.Json metadata in a type-safe way?

The best way to access System.Text.Json metadata safely is using typed metadata retrieval APIs like GetTypeInfo<T>(). This resolves the problem of untyped metadata access and exception-driven checks during .NET 11 JSON serialization.