SerializableDataTable 1.0.0

dotnet add package SerializableDataTable --version 1.0.0                
NuGet\Install-Package SerializableDataTable -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SerializableDataTable" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SerializableDataTable --version 1.0.0                
#r "nuget: SerializableDataTable, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SerializableDataTable as a Cake Addin
#addin nuget:?package=SerializableDataTable&version=1.0.0

// Install SerializableDataTable as a Cake Tool
#tool nuget:?package=SerializableDataTable&version=1.0.0                

<img src="https://github.com/jchristn/SerializableDataTable/blob/main/Assets/icon.png?raw=true" data-canonical-src="https://github.com/jchristn/SerializableDataTable/blob/main/Assets/icon.png?raw=true" width="128" height="128" />

SerializableDataTable

SerializableDataTable is a library providing an abstraction class that allows you to serialize and deserialize data to and from a DataTable instance.

Help, Feedback, Contribute

If you have any issues or feedback, please file an issue here in Github. We'd love to have you help by contributing code for new features, optimization to the existing codebase, ideas for future releases, or fixes!

New in v1.0.x

  • Initial release

Example

Refer to the Test project for exercising the library. This is example is using the NuGet package SerializationHelper for simplicity purposes.

using System.Data;
using SerializableDataTables;
using SerializationHelper;

// Create your DataTable and columns
DataTable dt1 = new DataTable();
dt1.Columns.Add(new DataColumn { ... });

// Create your DataRows
DataRow row = dt1.NewRow();
row["[name]"] = "[value]";
dt1.Rows.Add(row);

string json = Serializer.SerializeJson(SerializableDataTable.FromDataTable(dt), true);
Console.WriteLine("JSON: " + Environment.NewLine + json + Environment.NewLine);

DataTable dt2 = Serializer.DeserializeJson<SerializableDataTable>(json).ToDataTable();

Supported Data Types

This library supports the following DataTable value types: string, Int32, Int64, decimal, double, float, bool, DateTime, DateTimeOffset, byte, byte[], char, Guid.

The library currently does not support arrays or nested objects.

Version History

Refer to CHANGELOG.md for version history.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 104 7/26/2024

Initial release