Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 924151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:18:05+00:00 2026-05-15T19:18:05+00:00

We use .net binary serialization right now to serialize data to persist. It does

  • 0

We use .net binary serialization right now to serialize data to persist. It does the job but doesn’t fell like it’s intended to use for that purpose as changing data is not so trivial.

So i started looking into protobuf as it is designed around that purpose.

i am looking at protobuf-net to how to use it. Below are some thing i don’t know yet. if you got an answer already it will save my day.

  • I don’t care about .proto files as product is just in .net. So can i use protobuf-net without having .proto files.
  • If yes, can i later generate .proto file out of my c# classes if need port to other language
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T19:18:05+00:00Added an answer on May 15, 2026 at 7:18 pm

    Yes, protobuf-net works without .proto files. In fact, for protobuf-net the core was written long before the .proto support. All you need is something that allows it to obtain a unique number for each member you want to serialize. In “v2” (not released) you can do this externally, but in the available dll this means attributes. This can be the bespoke protobuf-net attributes, or you can use (for example) the DataContractSerializer attributes if that is more convenient:

    [DataContract]
    public class Foo {
        [DataMember(Order=1)]
        public int Abc {get;set;}
    
        [DataMember(Order=2)]
        public string Def {get;set;}
    }
    

    There is support for generating a .proto file (Serializer.GetProto) – however, there are some caveats:

    • protobuf-net supports inheritance; there is no definition of inheritance in the Google protobuf spec. If you think interop is a concern down the line, it may be best to avoid inheritance (although there is a way of interpreting it; probofuf-net always emits a valid protobuf stream)
    • other complex types may require interpretation; for example while float and double map directly to protobuf types (available in every implementation), that is not true of decimal and DateTime; if you think interop is an issue, it may be worth simplifying this from the start – for example deciding that you are going to send a DateTime, perhaps send a long that represents the offset into an epoch instead? easy to interpret in any implementation.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 508k
  • Answers 508k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer searchBar.showsBookmarkButton = YES; And then you can use the delegate… May 16, 2026 at 4:22 pm
  • Editorial Team
    Editorial Team added an answer what you're looking for is FIND_IN_SET function select find_in_set('1', '3,2,1');… May 16, 2026 at 4:22 pm
  • Editorial Team
    Editorial Team added an answer As stated in my commented addition on my original post,… May 16, 2026 at 4:22 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

In our .NET application we depend on binary serialization for our application project files.
I am faced with the following problem. I need to (de)serialize (binary) a stream
I have a class that I need to binary serialize. The class contains one
I have a .NET application which serializes an object in binary format. this object
I want to build an application being able to use .Net classes. If I
I'm trying to use Net::SSH::Perl to connect using public keys with this code: my
I have a .Net 3.5 class library project that I've migrated to use Visual
I'm running into problems serializing lots of objects in .NET. The object graph is
I have a WCF service hosted that is returning a byte[] of protobuf-net serialized
I have my own data structure written in C# (the structure is quite complex).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.