GenericConverter.JsonNet
1.0.4
See the version list below for details.
dotnet add package GenericConverter.JsonNet --version 1.0.4
NuGet\Install-Package GenericConverter.JsonNet -Version 1.0.4
<PackageReference Include="GenericConverter.JsonNet" Version="1.0.4" />
paket add GenericConverter.JsonNet --version 1.0.4
#r "nuget: GenericConverter.JsonNet, 1.0.4"
// Install GenericConverter.JsonNet as a Cake Addin #addin nuget:?package=GenericConverter.JsonNet&version=1.0.4 // Install GenericConverter.JsonNet as a Cake Tool #tool nuget:?package=GenericConverter.JsonNet&version=1.0.4
Generic Json Converter for .NET
This library is designed to make it easy to switch between Json.net and System.Text.Json without needing to change any code.
Since the advent of System.Text.Json it has been fairly easy to transition code from using Json.net to using System.Text.Json but the subtle differences in both packages make it a bit more difficult than it should be to switch between the two.
The idea of this small lib is to make it possible to write code once but be able to use either Json.net or System.Text.Json interchangably.
It does this by exposing a common interface then handling the slight differences between the platforms behind the scenes.
This is a .NET STANDARD 2.1 Library
Installation
Firstly install the abstractions (needed for using both Json.net and System.Text.Json)...
NuGet:
Install-Package GenericConverter.Abstractions
dotnet CLI
dotnet add package GenericConverter.Abstractions
Then.. if you are using Json.net install..
NuGet:
Install-Package GenericConverter.JsonNet
dotnet CLI
dotnet add package GenericConverter.JsonNet
If you are using System.Text.Json install..
NuGet:
Install-Package GenericConverter.SystemTextJson
dotnet CLI
dotnet add package GenericConverter.SystemTextJson
Note: Don't install both GenericConverter.JsonNet
and GenericConverter.SystemTextJson
, it's one or the other depending on which libraby you want to actually use.
Usage
todo:
using GenericConverter;
// todo: this
I make no claims about the speed and efficiency of this library; it's mostly designed for convenience but I certainly welcome any pull requests that make improvements or add features.
Tests
To run tests:
dotnet test
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request 😄
License
The MIT License (MIT) See LICENCE file for Licence (MIT Licence)
© 2021 Captive Reality Ltd. All Rights Reserved. Author: Mark Castle
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- GenericConverter.Abstractions (>= 1.0.4)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Newtonsoft.Json (>= 13.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.