Skip to content

Comparison in terms of time and space between two serializes Google Protocol Buffer and Newtonsoft.Json

Notifications You must be signed in to change notification settings

LiviuSosu/Protocol-Buffer-Vs-Newtonsoft.Json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Protocol-Buffer-Vs-Newtonsoft.Json

Comparison bewteen Google Protocol Buffer and Newtonsoft.Json.

Video may be found here:

[.NET Core] Comparison between Protocol buffer vs Newtonsoft.Json

Google Protocol Serializer documentation :

You will find the protoc.exe in this repository. However it my be outdated, so you can download from here. You may find it on the bottom of the list looking like protoc-version-operating_system.zip. For exemple: protoc-3.14.0-win32.zip

We will continue this article by showing you how to run the Protobuf command.

Go the the location where you have the protoc.exe downloaded. Open any command line utility. There is no need to run it as administrator.

The command has the following pattern:


protoc -I="your_class_path" --cdharp_out="your_path_where_you_want_your_otputed_proto_class" "your_proto_executable"


The command should look like:


protoc -I="C:\Users\Liviu\Career\Articles\Protocol-Buffer-Vs-Newtonsoft.Json\ConsoleApp1" --csharp_out="C:\Users\Liviu\Career\Articles\Protocol-Buffer-Vs-Newtonsoft.Json\ConsoleApp1" "C:\Users\Liviu\Career\Articles\Protocol-Buffer-Vs-Newtonsoft.Json\ConsoleApp1\demo-interface.proto"


Right now, all you have to do is to run the solution and two methods will be called:

SerializeProtoBuff(dataSize)
and
SerializeJson(dataSize)

We will skip showing how to utilize the NewtonSoft.Json library.

Contributions are wellcomed! :-)

About

Comparison in terms of time and space between two serializes Google Protocol Buffer and Newtonsoft.Json

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages