07:31Ignoring Properties when reading & writing JSON
From the creator
When serializing C# objects to JavaScript Object Notation (JSON), by default, all public properties are serialized. If you don't want some of them to appear in the resulting JSON, you have several options. In this video, James and Matt show you all of the built in options you can use to control this. Full Playlist: https://www.youtube.com/playlist?list=PLdo4fOcmZ0oVp5o3x_5IZiI7GNs0GklYH Chapters: 00:00 - What are extra JSON properties 01:30 - Ignoring a single property with JsonIgnore 04:00 - Ignoring read only fields and properties 05:30 - Ignoring default and null values 09:08 - JsonIgnore Conditions 12:40 - Always ignore everything 14:00 - Wrap-up Resources: Docs: https://learn.microsoft.com/dotnet/standard/serialization/system-text-json/ignore-properties Connect with .NET: Blog: https://aka.ms/dotnet/blog Twitter: https://aka.ms/dotnet/twitter TikTok: https://aka.ms/dotnet/tiktok Mastodon: https://aka.ms/dotnet/mastodon LinkedIn: https://aka.ms/dotnet/linkedin Facebook: https://aka.ms/dotnet/facebook Docs: https://learn.microsoft.com/dotnet Forums: https://aka.ms/dotnet/forums 🙋♀️Q&A: https://aka.ms/dotnet-qa 👨🎓Microsoft Learn: https://aka.ms/learndotnet #dotnet #systemtextjson #json
Published 2024-01-17 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.





