MASES.KNet.Serialization.Json
2.0.1
See the version list below for details.
dotnet add package MASES.KNet.Serialization.Json --version 2.0.1
NuGet\Install-Package MASES.KNet.Serialization.Json -Version 2.0.1
<PackageReference Include="MASES.KNet.Serialization.Json" Version="2.0.1" />
paket add MASES.KNet.Serialization.Json --version 2.0.1
#r "nuget: MASES.KNet.Serialization.Json, 2.0.1"
// Install MASES.KNet.Serialization.Json as a Cake Addin #addin nuget:?package=MASES.KNet.Serialization.Json&version=2.0.1 // Install MASES.KNet.Serialization.Json as a Cake Tool #tool nuget:?package=MASES.KNet.Serialization.Json&version=2.0.1
KNet: Serializer/Deserializer
KNet comes with a base set of serializer and deserializer. Most of them are usable with primitives types (bool, int, etc) and array of bytes.
If the user wants to use structures types there are two ways:
- Creates types in Java and reflects them in C#
- Creates types in C# and extend the available serializer/deserializer
KNet suite offers some ready made serializer/deserializer usable with the specific APIs (KNetProducer/KNetConsumer).
The current available packages are:
- MASES.KNet.Serialization.Avro: it is a serdes which uses AVRO; till now is not ready.
- MASES.KNet.Serialization.Json: it is a serdes which uses Json; till now it is at its first stage and it is based on general purpose API from:
- .NET Framework: it uses Newtonsoft.Json package
- .NET 6/7: it uses the Json which comes with the frameworks
- MASES.KNet.Serialization.MessagePack: it is a serdes which uses MessagePack; till now it is at its first stage and it is based on general purpose API from MessagePack package
- MASES.KNet.Serialization.Protobuf: it is a serdes which uses Google.Protobuf; till now it is at its first stage and it is based on general purpose API from Google.Protobuf package
Let consider a type defined like the following one:
public class TestType
{
public TestType(int i)
{
name = description = value = i.ToString();
}
public string name;
public string description;
public string value;
public override string ToString()
{
return $"name {name} - description {description} - value {value}";
}
}
To manage it within C#, without create TestType
in Java, an user can create:
- serializer (the body must be updated with the user serializer):
KNetSerDes<TestType> serializer = new KNetSerDes<TestType>((topic, type) => { return new byte[0]; });
- deserializer (the body must be updated with the user deserializer):
KNetSerDes<TestType> deserializer = new KNetSerDes<TestType>((topic, data) => { return new TestType(0); });
Otherwise the user can use a ready made class like in the following snippet:
KNetSerDes<TestType> serdes = new JsonSerDes<TestType>();
A single JsonSerDes
can be used in serialization and deserialization, and produce Json serialized data.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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 Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.6.2
- MASES.KNet (>= 2.0.1)
- Newtonsoft.Json (>= 13.0.3)
-
net6.0
- MASES.KNet (>= 2.0.1)
-
net7.0
- MASES.KNet (>= 2.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.
Version | Downloads | Last updated |
---|---|---|
2.8.2 | 64 | 11/5/2024 |
2.8.1 | 108 | 9/20/2024 |
2.8.0 | 98 | 8/6/2024 |
2.7.10 | 63 | 11/5/2024 |
2.7.9 | 114 | 9/20/2024 |
2.7.8 | 78 | 7/31/2024 |
2.7.7 | 52 | 7/30/2024 |
2.7.6 | 58 | 7/29/2024 |
2.7.5 | 95 | 7/2/2024 |
2.7.4 | 96 | 6/27/2024 |
2.7.3 | 93 | 6/24/2024 |
2.7.2 | 93 | 5/25/2024 |
2.7.1 | 103 | 5/18/2024 |
2.7.0 | 106 | 5/16/2024 |
2.6.7 | 60 | 11/5/2024 |
2.6.6 | 103 | 9/20/2024 |
2.6.5 | 97 | 9/16/2024 |
2.6.4 | 86 | 6/14/2024 |
2.6.3 | 79 | 6/11/2024 |
2.6.2 | 90 | 5/17/2024 |
2.6.1 | 83 | 5/3/2024 |
2.6.0 | 135 | 3/1/2024 |
2.5.0 | 110 | 2/28/2024 |
2.4.3 | 119 | 2/11/2024 |
2.4.2 | 119 | 1/27/2024 |
2.4.1 | 119 | 1/21/2024 |
2.4.0 | 111 | 1/20/2024 |
2.3.0 | 213 | 11/25/2023 |
2.2.0 | 154 | 10/19/2023 |
2.1.3 | 306 | 10/11/2023 |
2.1.2 | 303 | 10/6/2023 |
2.1.1 | 275 | 10/5/2023 |
2.1.0 | 194 | 9/27/2023 |
2.0.2 | 195 | 8/2/2023 |
2.0.1 | 180 | 7/11/2023 |
2.0.0 | 177 | 7/8/2023 |
1.5.5 | 180 | 7/1/2023 |
1.5.4 | 159 | 5/28/2023 |