Skip to content

Instantly share code, notes, and snippets.

@AnthonyGiretti
Created March 7, 2026 23:23
Show Gist options
  • Select an option

  • Save AnthonyGiretti/06d3c575158eea57684c9f783abf1bd7 to your computer and use it in GitHub Desktop.

Select an option

Save AnthonyGiretti/06d3c575158eea57684c9f783abf1bd7 to your computer and use it in GitHub Desktop.
.NET 10 introduces JsonSerializerOptions.Strict Deserialization
using System.Text.Json;
var options = JsonSerializerOptions.Strict;
var user = JsonSerializer.Deserialize<LoginRequest>(jsonPayload, options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment