ArkaSoftware.Extensions.Serializers.Abstractions
2.0.0
dotnet add package ArkaSoftware.Extensions.Serializers.Abstractions --version 2.0.0
NuGet\Install-Package ArkaSoftware.Extensions.Serializers.Abstractions -Version 2.0.0
<PackageReference Include="ArkaSoftware.Extensions.Serializers.Abstractions" Version="2.0.0" />
<PackageVersion Include="ArkaSoftware.Extensions.Serializers.Abstractions" Version="2.0.0" />
<PackageReference Include="ArkaSoftware.Extensions.Serializers.Abstractions" />
paket add ArkaSoftware.Extensions.Serializers.Abstractions --version 2.0.0
#r "nuget: ArkaSoftware.Extensions.Serializers.Abstractions, 2.0.0"
#:package ArkaSoftware.Extensions.Serializers.Abstractions@2.0.0
#addin nuget:?package=ArkaSoftware.Extensions.Serializers.Abstractions&version=2.0.0
#tool nuget:?package=ArkaSoftware.Extensions.Serializers.Abstractions&version=2.0.0
ArkaSoftware.Extensions.Serializers.Abstractions
ArkaSoftware.Extensions.Serializers.Abstractions provides clean and pluggable interfaces for handling both JSON and Excel serialization in .NET applications. These abstractions allow you to decouple your code from specific serialization libraries and make your architecture more modular and testable.
๐ง Interfaces
IJsonSerializer
A minimal interface to abstract JSON serialization and deserialization.
public interface IJsonSerializer
{
string Serialize<TInput>(TInput input);
TOutput Deserialize<TOutput>(string input);
object Deserialize(string input, Type type);
}
โ This allows you to plug in any JSON library such as:
System.Text.Json
Newtonsoft.Json
Utf8Json
or even your custom serializer.
IExcelSerializer
An interface for converting objects to and from Excel format.
public interface IExcelSerializer
{
byte[] ListToExcelByteArray<T>(List<T> list, string sheetName = "Result");
DataTable ExcelToDataTable(byte[] bytes);
List<T> ExcelToList<T>(byte[] bytes);
}
โ Useful in scenarios where:
You want to export reports or data tables to Excel
You need to read and process uploaded Excel files
You want to convert Excel to strongly typed objects
๐ฏ Why Use This?
Decouples business logic from infrastructure
Makes it easier to switch between libraries (e.g., Newtonsoft.Json โ System.Text.Json)
Enables mocking and testing of serialization logic
Enhances maintainability and consistency in large systems
๐งช Example: Testable Implementation
public class NewtonsoftJsonSerializer : IJsonSerializer
{
public string Serialize<TInput>(TInput input) =>
JsonConvert.SerializeObject(input);
public TOutput Deserialize<TOutput>(string input) =>
JsonConvert.DeserializeObject<TOutput>(input)!;
public object Deserialize(string input, Type type) =>
JsonConvert.DeserializeObject(input, type)!;
}
โ Use Cases
API serialization in Web APIs
Excel file exports and imports in admin dashboards
Integration with external systems that rely on Excel/JSON formats
๐ข Maintained by
ArkaSoftware
๐ง Email Us
๐ Web Site Visit
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- No dependencies.
NuGet packages (6)
Showing the top 5 NuGet packages that depend on ArkaSoftware.Extensions.Serializers.Abstractions:
| Package | Downloads |
|---|---|
|
ArkaSoftware.Extensions.Caching.Distributed.InMemory
Implimentaion Caching InMemory In Asp.net Core |
|
|
Arks.Framework.Infra.Data.MSSQL.Command
Infrastructure library for MSSQL command handling using Entity Framework Core. Provides base classes, extensions, interceptors, and value converters for efficient database interactions. |
|
|
ArkaSoftware.Extensions.Serializers.Microsoft
Serialize And Deserialize JSON And Any Template In Asp.Net Core Usage With Microsoft Infrastructure. |
|
|
Arks.Framework.Endpoints.Web
A library for building robust and standardized web endpoints in .NET applications. Includes base controllers, middleware, filters, and extensions for simplifying API development. |
|
|
Arks.Framework.Utilities.OutService
A multi-purpose library for .NET developers, including utilities for working with Persian dates, strings, and unique ID generation. |
GitHub repositories
This package is not used by any popular GitHub repositories.