Serialization and Deserialization
Serialization and deserialization are central to how POCO DataSet is used in modern
applications. DataSets frequently travel between backend services and UI
clients (such as Blazor) as JSON payloads. The serialization model is
intentionally simple: POCO objects with predictable structure, no hidden state,
and clear handling of interfaces and concrete types.
Goals of the Serialization Model
-
Support JSON-first application architectures.
-
Allow interfaces (such as IDataSet, IDataTable, IDataRow) to be serialized and deserialized reliably.
-
Avoid XML-centric assumptions or legacy behaviors from classic DataSet designs.
-
Provide clean, readable JSON that is easy to inspect and debug.
-
Enable long-term evolution of schemas through versioning patterns.
High-Level Flow
At a high level, the flow for using serialization with POCO DataSet is:
-
Backend constructs an IDataSet with tables, rows, and metadata.
-
The IDataSet is serialized to JSON using System.Text.Json (or Newtonsoft.Json) with custom converters.
-
The JSON payload is transmitted to a client or another service.
-
The receiving side deserializes JSON back into a DataSet using the same converter configuration.
-
Application code works with the reconstructed DataSet as if it were the original instance.
Table of Content
POCO DataSet