Depra.Serialization
1.2.0
dotnet add package Depra.Serialization --version 1.2.0
NuGet\Install-Package Depra.Serialization -Version 1.2.0
<PackageReference Include="Depra.Serialization" Version="1.2.0" />
paket add Depra.Serialization --version 1.2.0
#r "nuget: Depra.Serialization, 1.2.0"
// 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:
- Open the NuGet Package Manager window.
- Select the Packages tab.
- Search for Depra.Serialization.
- Choose the Depra.Serialization package.
- Select the project where you want to install the package.
- Click Install.
โ๏ธ Manual:
- Download the .dll file from the Releases section or download the source code.
- 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 inbyte[]
format.ITextSerializer
- Interface for serializing and deserializing data instring
format.IStreamSerializer
- Interface for serializing and deserializing data inStream
format.IMemorySerializer
- Interface for serializing and deserializing data inReadOnlyMemory<byte>
format.
๐ Usage Examples
- 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();
- 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 theNewtonsoft.Json
library.Depra.Microsoft.Json
- Adds support for serialization and deserialization in JSON format using theSystem.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 | Versions 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. |
-
.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.
Interfaces separated
Namespaces cleaned;