RCommon.Json
2.4.1
See the version list below for details.
dotnet add package RCommon.Json --version 2.4.1
NuGet\Install-Package RCommon.Json -Version 2.4.1
<PackageReference Include="RCommon.Json" Version="2.4.1" />
<PackageVersion Include="RCommon.Json" Version="2.4.1" />
<PackageReference Include="RCommon.Json" />
paket add RCommon.Json --version 2.4.1
#r "nuget: RCommon.Json, 2.4.1"
#:package RCommon.Json@2.4.1
#addin nuget:?package=RCommon.Json&version=2.4.1
#tool nuget:?package=RCommon.Json&version=2.4.1
RCommon.Json
Provides the JSON serialization abstraction layer for RCommon. This package defines the IJsonSerializer interface and configuration options, allowing your application to serialize and deserialize JSON without coupling to a specific library.
Features
IJsonSerializerinterface with generic and non-generic serialize/deserialize methodsJsonSerializeOptionsfor controlling camelCase naming and indented outputJsonDeserializeOptionsfor controlling camelCase naming during deserializationIJsonBuilderinterface for pluggable DI registration of JSON providers- Fluent
WithJsonSerialization<T>()extension method onIRCommonBuilderfor easy setup
Installation
dotnet add package RCommon.Json
Usage
This package is typically not used directly. Instead, install a concrete implementation such as RCommon.JsonNet or RCommon.SystemTextJson and register it through the RCommon builder:
using RCommon;
using RCommon.Json;
services.AddRCommon(builder =>
{
// Use one of the concrete implementations:
// builder.WithJsonSerialization<JsonNetBuilder>();
// builder.WithJsonSerialization<TextJsonBuilder>();
});
Once registered, inject IJsonSerializer anywhere in your application:
public class MyService
{
private readonly IJsonSerializer _serializer;
public MyService(IJsonSerializer serializer)
{
_serializer = serializer;
}
public string ToJson(Order order)
{
return _serializer.Serialize(order, new JsonSerializeOptions
{
CamelCase = true,
Indented = true
});
}
public Order FromJson(string json)
{
return _serializer.Deserialize<Order>(json);
}
}
Key Types
| Type | Description |
|---|---|
IJsonSerializer |
Abstraction for JSON serialization and deserialization operations |
JsonSerializeOptions |
Options for camelCase naming and indented formatting during serialization |
JsonDeserializeOptions |
Options for camelCase naming during deserialization |
IJsonBuilder |
Builder interface for registering a JSON provider into DI |
JsonBuilderExtensions |
Extension methods providing WithJsonSerialization<T>() on IRCommonBuilder |
Documentation
For full documentation, visit rcommon.com.
Related Packages
- RCommon.JsonNet - Newtonsoft.Json implementation of IJsonSerializer
- RCommon.SystemTextJson - System.Text.Json implementation of IJsonSerializer
License
Licensed under the Apache License, Version 2.0.
| Product | Versions 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 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 is compatible. 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. |
-
net10.0
- RCommon.Core (>= 2.4.1)
-
net8.0
- RCommon.Core (>= 2.4.1)
-
net9.0
- RCommon.Core (>= 2.4.1)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on RCommon.Json:
| Package | Downloads |
|---|---|
|
RCommon.MemoryCache
A cohesive set of infrastructure libraries for dotnet that utilizes abstractions for event handling, persistence, unit of work, mediator, distributed messaging, event bus, CQRS, email, and more |
|
|
RCommon.JsonNet
A cohesive set of infrastructure libraries for dotnet that utilizes abstractions for event handling, persistence, unit of work, mediator, distributed messaging, event bus, CQRS, email, and more |
|
|
RCommon.RedisCache
A cohesive set of infrastructure libraries for dotnet that utilizes abstractions for event handling, persistence, unit of work, mediator, distributed messaging, event bus, CQRS, email, and more |
|
|
RCommon.SystemTextJson
A cohesive set of infrastructure libraries for dotnet that utilizes abstractions for event handling, persistence, unit of work, mediator, distributed messaging, event bus, CQRS, email, and more |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.4.2-alpha.0.10 | 80 | 4/5/2026 |
| 2.4.2-alpha.0.9 | 60 | 3/26/2026 |
| 2.4.2-alpha.0.8 | 59 | 3/26/2026 |
| 2.4.2-alpha.0.7 | 55 | 3/26/2026 |
| 2.4.2-alpha.0.6 | 60 | 3/25/2026 |
| 2.4.2-alpha.0.5 | 59 | 3/24/2026 |
| 2.4.2-alpha.0.1 | 56 | 3/24/2026 |
| 2.4.1 | 221 | 2/18/2026 |
| 2.3.2-alpha.0.3 | 69 | 2/18/2026 |
| 2.3.2-alpha.0.2 | 66 | 2/18/2026 |
| 2.3.2-alpha.0.1 | 78 | 2/9/2026 |
| 2.3.1 | 283 | 2/5/2026 |
| 2.3.0 | 207 | 2/3/2026 |
| 2.2.2-alpha.0.1 | 411 | 12/11/2025 |
| 2.2.1-alpha.0.2 | 156 | 10/24/2025 |
| 2.2.1-alpha.0.1 | 156 | 10/24/2025 |
| 2.1.11-alpha.0.2 | 149 | 10/24/2025 |
| 2.1.11-alpha.0.1 | 126 | 7/18/2025 |
| 2.1.10 | 392 | 7/17/2025 |
| 2.1.9-alpha.0.1 | 171 | 7/17/2025 |