CoreSystem.Serialization 1.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package CoreSystem.Serialization --version 1.1.0
                    
NuGet\Install-Package CoreSystem.Serialization -Version 1.1.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="CoreSystem.Serialization" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CoreSystem.Serialization" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="CoreSystem.Serialization" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CoreSystem.Serialization --version 1.1.0
                    
#r "nuget: CoreSystem.Serialization, 1.1.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.
#:package CoreSystem.Serialization@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CoreSystem.Serialization&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=CoreSystem.Serialization&version=1.1.0
                    
Install as a Cake Tool

⚡ Core.Serialization

Production-ready serialization abstraction for .NET 8

Core.Serialization (distributed as the CoreSystem.Serialization NuGet package) provides a unified serialization abstraction for .NET applications, allowing you to seamlessly work with JSON, MessagePack, or Protocol Buffers through a single API.

NuGet Downloads License .NET


✨ Features

  • ✅ Unified serialization abstraction
  • ✅ JSON, MessagePack and Protocol Buffers support
  • ✅ Dependency Injection integration
  • ✅ Configurable serializer selection
  • ✅ Common exception model
  • ✅ High-level serialization API
  • ✅ Lightweight and reusable
  • ✅ Designed for infrastructure libraries

📦 Installation

dotnet add package CoreSystem.Serialization

🚀 Quick Start

Register the library:

builder.Services.AddCoreSerialization(options =>
{
    options.DefaultSerializer = SerializerType.Json;
});

Inject the serializer:

public sealed class ProductService(
    IPayloadSerializer serializer)
{
}

Serialize an object:

byte[] payload =
    serializer.Serialize(product);

Deserialize an object:

Product? restored =
    serializer.Deserialize<Product>(payload);

⚙️ Configuration

Customize the serializer during registration.

builder.Services.AddCoreSerialization(options =>
{
    options.DefaultSerializer = SerializerType.Json;

    // Configure JSON or MessagePack options here.
});

📚 Supported Serializers

JSON

Recommended for:

  • Human-readable payloads
  • Debugging
  • Maximum compatibility

MessagePack

Recommended for:

  • High-performance APIs
  • Compact payloads
  • Low latency

Protocol Buffers

Recommended for:

  • Cross-platform communication
  • Contract-first serialization
  • Compact binary payloads

Protocol Buffers requires serialized types to be compatible with protobuf-net.

[ProtoContract]
public sealed class Product
{
    [ProtoMember(1)]
    public int Id { get; set; }

    [ProtoMember(2)]
    public string Name { get; set; } = string.Empty;
}

⚠️ Exception Handling

All serializer-specific exceptions are wrapped by a common exception type.

try
{
    var payload =
        serializer.Serialize(product);
}
catch (CoreSerializationException ex)
{
    Console.WriteLine(ex.Serializer);
}

📊 Why Core.Serialization?

Capability Raw Serializer Libraries CoreSystem.Serialization
Unified API
Dependency Injection
JSON
MessagePack
Protocol Buffers
Configurable serializer selection
Common exception model

🤝 Contributing

Issues, discussions and pull requests are welcome.


📄 License

Released under the MIT License.

Product Compatible and additional computed target framework versions.
.NET 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.  net9.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

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

Package Downloads
CoreSystem.Cache

Distributed cache abstraction for .NET 8 supporting Redis and In-Memory providers, with native OpenTelemetry integration.

CoreSystem.Idempotency

Production-ready idempotency framework for ASP.NET Core that guarantees exactly-once request processing with Redis and PostgreSQL providers, request fingerprinting, response replay, and native OpenTelemetry support.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 132 7/10/2026
1.1.0 99 7/10/2026
1.0.0 94 7/8/2026

Initial stable release.
 • Unified serialization abstraction
 • JSON serializer
 • MessagePack serializer
 • Protocol Buffers serializer
 • Dependency Injection integration