Sign in to confirm you’re not a bot
This helps protect our community. Learn more
Customizing property names & values when reading .NET objects as JSON
104Likes
3,846Views
2024Jan 10
By default, property names and dictionary keys are unchanged in the JSON output, including case. Enum values are represented as numbers. And properties are serialized in the order they're defined. However, you can customize these behaviors by customizing property names and dictionary keys in the JSON output, including case and the order they're defined. James and Matt break it all down. Chapters: 00:00 - Introduction JSON properties 01:30 - Customizing property names 04:00 - Property naming policies and casing 09:45 - Custom naming policies 11:45 - Sorting JSON properties 14:40 - Wrap-up Resources: Docs: https://learn.microsoft.com/dotnet/st... 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

Follow along using the transcript.

dotnet

325K subscribers