James and Matt walk through the basics of System.Text.Json to read and write .NET objects as JSON! This amazing built in feature of .NET that nearly every app can utilize. Serialization is the process of converting the state of an object, that is, the values of its properties, into a form that can be stored or transmitted. The serialized form doesn't include any information about an object's associated methods. Deserialization reconstructs an object from the serialized form.
The System.Text.Json library design emphasizes high performance and low memory allocation over an extensive feature set. Built-in UTF-8 support optimizes the process of reading and writing JSON text encoded as UTF-8, which is the most prevalent encoding for data on the web and files on disk.
The library also provides classes for working with an in-memory document object model (DOM). This feature enables random access to the elements in a JSON file or string.
00:00 - Intro & What is JSON and System.Text.Json?
03:00 - Writing/Serializing .NET Objects as JSON
07:40 - Writing JSON Data to a File
12:05 - Reading/Deserializing JSON as .NET Objects
15:05 - Reading a JSON File to a .NET Object
19:00 - Wrap-up and what's next
Docs: https://learn.microsoft.com/dotnet/standard/serialization/system-text-json/overview
.NET Beginner Videos: https://dot.net/videos
Free Code Camp Certification: https://aka.ms/csharp-certification
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