SkinnyJson 2.1.0
See the version list below for details.
dotnet add package SkinnyJson --version 2.1.0
NuGet\Install-Package SkinnyJson -Version 2.1.0
<PackageReference Include="SkinnyJson" Version="2.1.0" />
paket add SkinnyJson --version 2.1.0
#r "nuget: SkinnyJson, 2.1.0"
// Install SkinnyJson as a Cake Addin #addin nuget:?package=SkinnyJson&version=2.1.0 // Install SkinnyJson as a Cake Tool #tool nuget:?package=SkinnyJson&version=2.1.0
SkinnyJson
Based on FastJson: https://github.com/mgholam/fastJSON
Nuget:
- Default: https://www.nuget.org/packages/SkinnyJson/
- Strong-named: https://www.nuget.org/packages/SkinnyJson/
The default is usually ahead of the strong-named version. If you need an updated version of the Strong-Named package, please open a Github issue.
SkinnyJson has a simple interface, and handles interface based serialisation better than most other .Net json libraries. SkinnyJson was designed to handle Event Store messages, and is tuned to deal with situations where a common interface declaration is available, but the original serialised objects/types are not available.
To adjust settings globally, look in SkinnyJson.Json.DefaultParameters
Common use cases:
Deserialise a known type:
IMyInterface values = Json.Defrost<IMyInterface>(jsonString);
Serialise any object to JSON:
string jsonString = Json.Freeze(myObject);
Pretty print a JSON string: (there is also a streaming version for very large files)
var newString = Json.Beautify(oldString);
Create a deep copy of an object:
var newObject = Json.Clone(oldObject);
Deserialise to a dynamic type for unknown schemas:
dynamic obj = Json.DefrostDynamic(jsonString);
Console.WriteLine(obj.MyProperty.MyArray[4].Prop2()); // use `()` to read a value.
var missing = obj.NotHere.child.grandchild(); // results in null. Dynamic does null propagation.
obj.MyProperty.other = "hello"; // can update properties
var updatedJson = Json.Freeze(obj); // and serialise the result
Inline editing:
string newJson = Json.Edit(oldJson, d => {
d.myProperty.updated = true;
d.info.updates[0].dateTime = DateTime.Now.ToString();
});
See the test cases for deeper examples
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 | 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 was computed. 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. |
This package has no dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SkinnyJson:
Package | Downloads |
---|---|
BearBonesMessaging
BearBones messaging: lower-level framework, part of a contract-interface based distributed event framework for .Net |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.0.6 | 321 | 8/2/2024 |
3.0.5 | 239 | 7/26/2024 |
3.0.4 | 51 | 7/26/2024 |
3.0.3 | 298 | 6/29/2024 |
3.0.2 | 619 | 6/27/2024 |
3.0.1 | 212 | 6/14/2024 |
3.0.0 | 96 | 6/13/2024 |
2.8.5 | 228 | 5/22/2024 |
2.8.4 | 99 | 5/13/2024 |
2.8.3 | 2,035 | 4/22/2024 |
2.8.2 | 92 | 4/19/2024 |
2.8.1 | 437 | 2/27/2024 |
2.8.0 | 742 | 2/8/2024 |
2.7.5 | 232 | 7/10/2023 |
2.7.0 | 150 | 7/4/2023 |
2.6.0 | 140 | 6/22/2023 |
2.5.0 | 161 | 5/19/2023 |
2.4.2 | 236 | 3/13/2023 |
2.4.1 | 285 | 12/13/2022 |
2.4.0 | 289 | 12/13/2022 |
2.3.0 | 276 | 12/12/2022 |
2.2.3 | 448 | 9/5/2022 |
2.2.2 | 398 | 9/2/2022 |
2.2.1 | 404 | 9/2/2022 |
2.1.1 | 4,701 | 5/30/2022 |
2.1.0 | 482 | 3/7/2022 |
2.0.3 | 459 | 3/4/2022 |
2.0.2 | 409 | 5/24/2021 |
2.0.1 | 378 | 5/17/2021 |
2.0.0 | 3,283 | 12/1/2020 |
1.8.0 | 516 | 11/3/2020 |
1.7.0 | 1,617 | 7/3/2019 |
1.6.9 | 1,588 | 5/22/2019 |
1.6.8 | 1,172 | 5/22/2019 |
1.6.5 | 4,433 | 1/10/2019 |
1.6.4 | 722 | 1/10/2019 |
1.6.3 | 2,164 | 12/13/2018 |
1.6.2 | 756 | 11/24/2018 |
1.6.1 | 765 | 11/23/2018 |
1.6.0 | 742 | 11/23/2018 |
1.5.5 | 762 | 11/7/2018 |
1.5.0 | 848 | 8/24/2018 |
1.4.0 | 875 | 8/24/2018 |
1.3.2 | 859 | 8/14/2018 |
1.3.1 | 888 | 8/14/2018 |
1.3.0 | 933 | 7/25/2018 |
1.2.0 | 881 | 7/23/2018 |
1.0.3 | 1,006 | 6/27/2018 |
1.0.2 | 1,434 | 8/26/2014 |
1.0.1 | 1,078 | 8/20/2014 |
1.0.0 | 1,099 | 8/20/2014 |
Improvements to case sensitivity and switching settings.