Chubrik.Json
1.0.5
Use the System.Text.Json package version 8.0+ instead. It fully matches the functionality of the current package.
dotnet add package Chubrik.Json --version 1.0.5
NuGet\Install-Package Chubrik.Json -Version 1.0.5
<PackageReference Include="Chubrik.Json" Version="1.0.5" />
paket add Chubrik.Json --version 1.0.5
#r "nuget: Chubrik.Json, 1.0.5"
// Install Chubrik.Json as a Cake Addin #addin nuget:?package=Chubrik.Json&version=1.0.5 // Install Chubrik.Json as a Cake Tool #tool nuget:?package=Chubrik.Json&version=1.0.5
Chubrik.Json
Provides snake_case
& kebab-case
property name serialization.
Tiny and high-performance .NET library based on System.Text.Json.
Here is the benchmark summary:
<br><br>
Install
PM> Install-Package Chubrik.Json
Usage
using Chubrik.Json;
using System.Text.Json;
var myObj = new { FirstName = "John", LastName = "Smith" };
var options = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicies.SnakeLowerCase };
var json = JsonSerializer.Serialize(value: myObj, options: options);
Console.WriteLine(json); // {"first_name":"John","last_name":"Smith"}
<br>
Examples
The following table shows the serialization rules for different JSON naming policies: | Original name | SnakeLowerCase | SnakeUpperCase | KebabLowerCase | KebabUpperCase | | --------------- | ---------------- | ---------------- | ---------------- | ---------------- | | PascalProp | pascal_prop | PASCAL_PROP | pascal-prop | PASCAL-PROP | | camelProp | camel_prop | CAMEL_PROP | camel-prop | CAMEL-PROP | | Snake_Prop | snake_prop | SNAKE_PROP | snake-prop | SNAKE-PROP | | SEMIUpper | semi_upper | SEMI_UPPER | semi-upper | SEMI-UPPER | | _Underlined_ | _underlined_ | _UNDERLINED_ | -underlined- | -UNDERLINED- | | Version1 | version1 | VERSION1 | version1 | VERSION1 | | Version2Alpha | version2_alpha | VERSION2_ALPHA | version2-alpha | VERSION2-ALPHA | | Version3beta | version3beta | VERSION3BETA | version3beta | VERSION3BETA | | Version4_Gamma | version4_gamma | VERSION4_GAMMA | version4-gamma | VERSION4-GAMMA | | Hex1_0xa1b23c | hex1_0xa1b23c | HEX1_0XA1B23C | hex1-0xa1b23c | HEX1-0XA1B23C | | ΞένοΌνομα | ξένο_όνομα | ΞΈΝΟ_ΌΝΟΜΑ | ξένο-όνομα | ΞΈΝΟ-ΌΝΟΜΑ | <br>
<a name="license"></a>License
The Chubrik.Json is licensed under the MIT license. <br><br>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. 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 is compatible. 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 | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- System.Text.Json (>= 7.0.2)
-
.NETStandard 2.0
- System.Text.Json (>= 7.0.2)
-
net5.0
- No dependencies.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.