AvroConvert 2.6.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package AvroConvert --version 2.6.0
NuGet\Install-Package AvroConvert -Version 2.6.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AvroConvert" Version="2.6.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AvroConvert --version 2.6.0
#r "nuget: AvroConvert, 2.6.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AvroConvert as a Cake Addin
#addin nuget:?package=AvroConvert&version=2.6.0

// Install AvroConvert as a Cake Tool
#tool nuget:?package=AvroConvert&version=2.6.0

Docs

Avro format combines readability of JSON and compression of binary data serialization.

Introduction article

Apache Wiki

General information

Documentation

Benefits

The main purpose of the project was to enhance communication between microservices. Replacing JSON with Avro brought three main benefits:

  • Decreased the communication time between microservices
  • Reduced the network traffic by about 30%
  • Increased communication security - the data was not visible in plain JSON text
Converter Request time [ms] Compressed size [kB]
Json 1076 9945
Avro (default) 509 2435
Avro (Headless) 465 2434
Avro (Deflate encoding) 453 206

In the purpose of introducing Avro API, I've written an article, which you can read here: https://xabe.net/why-avro-api-is-the-best-choice/
It contains also description of the format, detailed results of the benchmarks and implementation details.

Conclusion: <br> Using Avro for communication between your services significantly reduces communication time and network traffic. Additionally choosing encoding (compression algorithm) can improve the results even further.

Features

  • Serialization and deserialization data in Avro format
  • Extended support for C# data structures: Dictionary, List, DateTime and many others
  • Support for codecs: deflate, snappy, gzip
  • Support for Attributes: DataContract, DataMember, DefaultValue, NullableSchema
  • "Headless" - serialization and deserialization based on provided schema

Full Changelog

Nuget - Library containing functionalities, which enable communication between microservices via Http using Avro data format

Nuget - Library containing extensions for Confluent Kafka platform - used together with Kafka Consumer and Producer

Code samples

//Serialization
 byte[] avroObject = AvroConvert.Serialize(object yourObject);
//Deserialization
CustomClass deserializedObject = AvroConvert.Deserialize<CustomClass>(byte[] avroObject);
//Generate Avro schema

//Model
public class SimpleTestClass
{
	public string justSomeProperty { get; set; }

	public long andLongProperty { get; set; }
}


//Action
string schemaInJsonFormat = AvroConvert.GenerateSchema(typeof(SimpleTestClass));


//Produces following schema:
"{"type":"record","name":"AvroConvert.SimpleTestClass","fields":[{"name":"justSomeProperty","type":"string"},{"name":"andLongProperty","type":"long"}]}"
//Read schema from Avro file
string schemaInJsonFormat = AvroConvert.GetSchema(byte[] avroObject)

Full Documentation

License

AvroConvert is licensed under Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0) - see License for details
For commercial purposes purchase AvroConvert on website - Xabe.net

Contribution

We want to improve AvroConvert as much as possible. If you have any idea, found next possible feature, optimization opportunity or better way for integration, leave a comment or pull request.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on AvroConvert:

Package Downloads
SolTechnology.Avro.Kafka

Library containing extensions for Confluent Kafka platform

Memphis.Client

Memphis.Client SDK intended to make easy integration of Memphis into .NET projects

SolTechnology.Avro.Http

Library containing functionalities, which enable communication between microservices using Avro data format

OptimoveSdk.Engager.Integration

SDK for Engagers intergration with Optimove

SolTechnology.Core.ApiClient

SolTechnology Core API client library

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.4.6 6,011 3/4/2024
3.4.5 2,488 2/15/2024
3.4.4 6,422 1/16/2024
3.4.3 28,580 12/9/2023
3.4.2 2,889 12/1/2023
3.4.1 8,095 11/11/2023
3.4.0 17,625 9/18/2023
3.3.7 12,869 8/7/2023
3.3.6 24,767 5/29/2023
3.3.5 6,861 5/11/2023
3.3.4 39,954 3/3/2023
3.3.3 540 2/28/2023
3.3.2 20,907 2/6/2023
3.3.1 2,716 1/27/2023
3.3.0 78,654 10/11/2022
3.2.9 72,584 6/22/2022
3.2.8 2,036 6/1/2022
3.2.7 1,997 5/23/2022
3.2.6 775 5/16/2022
3.2.5 59,752 4/13/2022
3.2.4 801 4/10/2022
3.2.3 29,149 10/29/2021
3.2.2 24,361 10/2/2021
3.2.1 982 9/29/2021
3.2.0 2,593 9/14/2021
3.1.5 22,769 8/30/2021
3.1.4 3,836 8/12/2021
3.1.3 3,749 8/2/2021
3.1.2 4,283 6/24/2021
3.1.1 1,137 6/14/2021
3.1.0 20,854 5/15/2021
3.0.1 5,638 4/2/2021
3.0.0 24,236 3/26/2021
2.7.1 54,111 2/5/2021
2.7.0 34,533 12/18/2020
2.6.3 3,079 10/25/2020
2.6.2 469 10/23/2020
2.6.1 3,749 7/25/2020
2.6.0 548 7/22/2020
2.5.1 1,402 6/11/2020
2.5.0 14,867 5/15/2020
2.4.1 1,420 4/14/2020
2.4.0 927 3/25/2020
2.3.0 754 3/19/2020
2.2.2 1,036 2/7/2020
2.2.1 553 2/7/2020
2.2.0 647 1/27/2020
2.1.0 544 1/16/2020
2.0.0 534 1/4/2020
1.8.1 825 12/9/2019
1.8.0 3,115 8/30/2019
1.7.0 595 8/22/2019
1.6.0 619 7/22/2019
1.5.1 693 7/14/2019
1.5.0 723 7/11/2019
1.4.0 593 6/17/2019
1.3.0 627 6/4/2019
1.2.0 684 6/3/2019
1.1.0 639 5/28/2019
1.0.1 729 5/21/2019
1.0.0 987 4/24/2019
0.8.0 941 5/1/2019
0.7.0 994 4/22/2019
0.6.3 926 4/19/2019
0.6.2 945 4/19/2019
0.6.1 889 4/19/2019
0.6.0 922 4/19/2019
0.5.0 1,027 4/18/2019
0.3.0 1,177 4/11/2019
0.2.1 965 4/11/2019
0.2.0 966 4/11/2019
0.1.0 1,010 4/10/2019