Manipulating JSON Documents in .NET 8
Published: 4/27/2024JavaScript Object Notation (JSON) is a great way of storing configuration settings for a .NET application. JSON is also an efficient method to transfer data from one machine to another. JSON is easy to create, is human readable, and is easy for programming languages to parse and generate. This text-based format for representing data is language agnostic and thus easy to use in C#, JavaScript, Python, and almost any programming language existing today. In this article, you're going to learn multiple methods of creating and manipulating JSON documents in .NET 8. In addition, you'll learn how to serialize and deserialize C# objects to and from JSON.
XML Serialization and Validation in .NET Core
Published: 1/1/2024In this article, you're going to learn the many ways to serialize and deserialize C# objects to and from memory and disk. Along the way, you're going to create some classes with extension methods to simplify the serialization process.
Process XML Files Easily Using .NET Core
Published: 11/7/2023In this article you are going to learn how to read and write XML files using C# and .NET Core. There are a few minor differences from the .NET Framework classes you used before. The .NET Core XML processing has been greatly optimized and processes XML files much faster than the .NET Framework. In this article you learn to create XML document in memory, save and load XML files from disk. You also see how to use LINQ to XML for processing XML nodes including sorting, filtering, and aggregation.
LINQ to XML Instead of a Database
Published: 10/1/2012When people think of having to store data for their applications, a database such as SQL Server immediately comes to mind. However, XML files are very handy for storing data without the overhead of a database. Using XML files to cache often-used, but seldom changed data such as US state codes, employee types and other validation tables can avoid network roundtrips and speed up your application. In addition, XML files are great for off-line applications where a user needs to add, edit and delete data when they can't connect to a database.