Franz.Common.Serialization
1.6.15
dotnet add package Franz.Common.Serialization --version 1.6.15
NuGet\Install-Package Franz.Common.Serialization -Version 1.6.15
<PackageReference Include="Franz.Common.Serialization" Version="1.6.15" />
<PackageVersion Include="Franz.Common.Serialization" Version="1.6.15" />
<PackageReference Include="Franz.Common.Serialization" />
paket add Franz.Common.Serialization --version 1.6.15
#r "nuget: Franz.Common.Serialization, 1.6.15"
#:package Franz.Common.Serialization@1.6.15
#addin nuget:?package=Franz.Common.Serialization&version=1.6.15
#tool nuget:?package=Franz.Common.Serialization&version=1.6.15
Franz.Common.Serialization
A serialization utility library within the Franz Framework that simplifies JSON and byte array serialization. This package includes custom JSON converters, serializers, and extensions for seamless integration into .NET applications.
Features
- Custom JSON Converters:
DateTimeJsonConverterandDateTimeOffsetJsonConverterfor handling specific datetime formats.EnumerationJsonConverterfor serializing and deserializing enumerations.
- Byte Array Serialization:
ByteArraySerializerandIByteArraySerializerfor efficient byte array serialization and deserialization.
- JSON Serialization:
JsonSerializerandJsonCreationConverterfor custom JSON serialization logic.
- Service Registration:
ServiceCollectionExtensionsto streamline serializer setup and dependency injection.
Version Information
- Current Version: 1.6.15
- Part of the private Franz Framework ecosystem.
Dependencies
This package is lightweight and has no external dependencies beyond the .NET runtime.
Installation
From Private Azure Feed
Since this package is hosted privately, configure your NuGet client:
dotnet nuget add source "https://your-private-feed-url" \
--name "AzurePrivateFeed" \
--username "YourAzureUsername" \
--password "YourAzurePassword" \
--store-password-in-clear-text
Install the package:
dotnet add package Franz.Common.Serialization
Usage
1. Register Serialization Services
Use ServiceCollectionExtensions to register the serializers:
using Franz.Common.Serialization.Extensions;
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddSerialization();
}
}
2. Serialize and Deserialize JSON
Leverage JsonSerializer for JSON operations:
using Franz.Common.Serialization;
var jsonSerializer = new JsonSerializer();
var jsonData = jsonSerializer.Serialize(new { Name = "John", Age = 30 });
var person = jsonSerializer.Deserialize<Person>(jsonData);
3. Use Custom JSON Converters
Register and use custom converters like DateTimeJsonConverter:
var options = new JsonSerializerOptions();
options.Converters.Add(new DateTimeJsonConverter());
var json = JsonSerializer.Serialize(DateTime.Now, options);
var dateTime = JsonSerializer.Deserialize<DateTime>(json, options);
4. Byte Array Serialization
Utilize ByteArraySerializer for byte array operations:
using Franz.Common.Serialization;
var byteArraySerializer = new ByteArraySerializer();
var data = new byte[] { 1, 2, 3, 4 };
var serialized = byteArraySerializer.Serialize(data);
var deserialized = byteArraySerializer.Deserialize<byte[]>(serialized);
Integration with Franz Framework
The Franz.Common.Serialization package integrates seamlessly with the Franz Framework, providing utilities for efficient serialization and deserialization in distributed systems. Combine it with other Franz packages for enhanced functionality.
Contributing
This package is part of a private framework. Contributions are limited to the internal development team. If you have access, follow these steps:
- Clone the repository. @ https://github.com/bestacio89/Franz.Common/
- Create a feature branch.
- Submit a pull request for review.
License
This library is licensed under the MIT License. See the LICENSE file for more details.
Changelog
Version 1.2.65
- Added
DateTimeJsonConverter,DateTimeOffsetJsonConverter, andEnumerationJsonConverter. - Introduced
ByteArraySerializerandIByteArraySerializer. - Enhanced JSON serialization with
JsonSerializerandJsonCreationConverter. - Provided
ServiceCollectionExtensionsfor streamlined DI setup.
Version 1.3
- Upgraded to .NET 9.0.8
- Added new features and improvements
- Separated business concepts from mediator concepts
- Now compatible with both the in-house mediator and MediatR
| 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
- Franz.Common (>= 1.6.15)
- Franz.Common.Business (>= 1.6.15)
- Franz.Common.DependencyInjection (>= 1.6.15)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.8)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Franz.Common.Serialization:
| Package | Downloads |
|---|---|
|
Franz.Common.Messaging.Hosting
Shared utility library for the Franz Framework. |
|
|
Franz.Common.Http
Shared utility library for the Franz Framework. |
|
|
Franz.Common.Http.Headers
Shared utility library for the Franz Framework. |
|
|
Franz.Common.Http.Client
Shared utility library for the Franz Framework. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.6.15 | 266 | 10/20/2025 |
| 1.6.14 | 346 | 10/15/2025 |
| 1.6.3 | 347 | 10/9/2025 |
| 1.6.2 | 361 | 10/7/2025 |
| 1.5.9 | 275 | 9/24/2025 |
| 1.5.4 | 239 | 9/23/2025 |
| 1.5.3 | 290 | 9/21/2025 |
| 1.5.2 | 278 | 9/21/2025 |
| 1.5.0 | 289 | 9/21/2025 |
| 1.4.4 | 257 | 9/20/2025 |
| 1.3.14 | 362 | 9/18/2025 |
| 1.3.13 | 353 | 9/18/2025 |
| 1.3.5 | 355 | 9/17/2025 |
| 1.3.4 | 352 | 9/16/2025 |
| 1.3.3 | 358 | 9/16/2025 |
| 1.3.2 | 322 | 9/15/2025 |
| 1.3.1 | 132 | 9/12/2025 |
| 1.3.0 | 346 | 8/25/2025 |
| 1.2.65 | 253 | 3/3/2025 |
| 1.2.64 | 191 | 1/29/2025 |
| 1.2.63 | 239 | 1/27/2025 |
| 1.2.62 | 191 | 1/8/2025 |