Newtonsoft Json.Net

Json.NET is a popular high-performance JSON framework for .NET. If you are familiar with it, probably this package is what you need.

Install

Install-Package StackExchange.Redis.Extensions.Newtonsoft

Setup

Now that you have installed the package, you can register it into your favourite dependency injection framework:

Example using Microsoft.Extensions.DependencyInjection:

services.AddSingleton<ISerializer, NewtonsoftSerializer>();

Example using Castle.Windsor:

container.Register(Component.For<ISerializer>()
				.ImplementedBy<NewtonsoftSerializer>()
				.LifestyleSingleton());

The library used is Newtonsoft.Json version 12.0.3. For more information about it, please take a look here https://www.newtonsoft.com/json

Last updated