Depra.Serialization 1.2.0

dotnet add package Depra.Serialization --version 1.2.0                
NuGet\Install-Package Depra.Serialization -Version 1.2.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="Depra.Serialization" Version="1.2.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Depra.Serialization --version 1.2.0                
#r "nuget: Depra.Serialization, 1.2.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 Depra.Serialization as a Cake Addin
#addin nuget:?package=Depra.Serialization&version=1.2.0

// Install Depra.Serialization as a Cake Tool
#tool nuget:?package=Depra.Serialization&version=1.2.0                

Depra.Serialization

๐Ÿงพ Introduction

Depra.Serialization is a library that provides interfaces for abstracting serialization and deserialization of data.

๐Ÿ’ก Features:

  • Standardization: Unified API for all serialization/deserialization formats.
  • Extensibility: Flexible architecture for extending functionality to suit your needs.
  • Testing: Code coverage with tests to ensure stability and reliability.
  • Documentation: Detailed documentation for ease of use.
  • License: Distributed under the Apache-2.0 license.
  • Free: Use this library in any projects, including commercial ones.
  • Security: The library does not contain code that can harm your project.
  • Support: Library support will continue indefinitely.
  • Independence: The library does not depend on other libraries and packages.
  • Lightweight: The library does not contain unnecessary code and dependencies.
  • Simplicity: The library has a simple and understandable architecture.
  • Debugging Convenience: The library throws clear exceptions and error messages in debug mode (DEBUG).

๐Ÿฆพ Capabilities:

  • Support for serialization and deserialization in the following formats:
    • Binary
    • JSON
    • XML
    • YAML
    • CSV

๐Ÿ“ฅ Installation

๐Ÿ“ฆ Via NuGet:

  1. Open the NuGet Package Manager window.
  2. Select the Packages tab.
  3. Search for Depra.Serialization.
  4. Choose the Depra.Serialization package.
  5. Select the project where you want to install the package.
  6. Click Install.

โš™๏ธ Manual:

  1. Download the .dll file from the Releases section or download the source code.
  2. Import it into your project.

๐Ÿ“– Contents

The key concepts used in this library are described in the following interfaces:

  • IRawSerializer - Interface for serializing and deserializing data in byte[] format.
  • ITextSerializer - Interface for serializing and deserializing data in string format.
  • IStreamSerializer - Interface for serializing and deserializing data in Stream format.
  • IMemorySerializer - Interface for serializing and deserializing data in ReadOnlyMemory<byte> format.

๐Ÿ“‹ Usage Examples

  1. Create an instance of the serializer that supports the format you want to use. You can register it in the DI container if you are using it in your project.
IRawSerializer serializer = new BinarySerializer();
  1. Use the serializer to serialize and deserialize data.
var serialized = serializer.Serialize<MyDataType>(data);
var deserialized = await serializer.DeserializeAsync(serialized, typeof(MyDataType));

โž• Extensions

  • Depra.Newtonsoft.Json - Adds support for serialization and deserialization in JSON format using the Newtonsoft.Json library.
  • Depra.Microsoft.Json - Adds support for serialization and deserialization in JSON format using the System.Text.Json library.

๐Ÿค Collaboration

I welcome feature requests and bug reports in the issues section, and I also accept pull requests.

๐Ÿซ‚ Support

I am an independent developer, and most of the development of this project is done in my spare time. If you are interested in collaborating or hiring me for a project, please check out my portfolio and contact me!

๐Ÿ” License

This project is distributed under the Apache-2.0 license.

Copyright (c) 2023 Nikolay Melnikov n.melnikov@depra.org

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 was computed.  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 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Depra.Serialization:

Package Downloads
Depra.Serialization.Json.Newtonsoft

Adapter for serializer from Newtonsoft.

Depra.Serialization.Json.Microsoft

Adapter for serializer from System.Text.Json.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.0 220 9/20/2023
1.1.5 230 8/19/2023
1.1.4 264 7/8/2023
1.1.3 647 11/6/2022
1.1.2 417 10/31/2022
1.1.1 444 10/31/2022
1.1.0 433 10/31/2022

Interfaces separated
Namespaces cleaned;