Two notable improvements are coming to System.Text.Json in .NET 10. First, duplicate JSON property rejection: previously, deserializing JSON with duplicate keys silently kept the last value; now you can set AllowDuplicateProperties = false on JsonSerializerOptions to throw a JsonException instead, enabling stricter input validation. Second, direct PipeReader integration: rather than bridging a PipeReader to a Stream or manually looping with Utf8JsonReader, you can now pass a PipeReader directly to JsonSerializer.DeserializeAsync, reducing boilerplate and improving performance in high-throughput pipeline scenarios.

3m read timeFrom anthonygiretti.com
Post cover image
Table of contents
IntroductionDuplicate Property RejectionPretty useful right? PipeReader IntegrationConclusion

Sort: