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 5982513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:05:52+00:00 2026-05-22T22:05:52+00:00

Is it possible to (de)serialize a POCO type using neither protobuf-net attributes nor explicitly

  • 0

Is it possible to (de)serialize a POCO type using neither protobuf-net attributes nor explicitly adding types into the model?

  • 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-22T22:05:53+00:00Added an answer on May 22, 2026 at 10:05 pm

    At the moment – in short, no. It needs to have a basic understanding of how you intend it to operate. I guess maybe I could add something to let you specify a default strategy for completely unadorned types (things that aren’t DataContract, ProtoContract or XmlType), but the most appropriate option there would be “all public members” (much like XmlSerializer).

    The reason I don’t want to encourage this is that it is brittle. Because of how the protobuf spec is defined, all you get is field-numbers. It is easy enough to say “ok, order them alphabetically and use their positions”, but that is not safe if you ever want to change the type. And let’s face it, we all do. You’d be amazed how often I add an AardvarkCount property, which messes with alphabetical orderings.

    Hence, I don’t want to make it easy to get people into a position where they risk data integrity. Because I don’t like people shouting at me. If there was a global default policy, it would be easy to use that policy without realising it, which is when you start getting into trouble.

    I do, however, intend making it easier to choose those strategies on a per-type basis (the code all exists, it just isn’t in the public API) – for example:

    model.Add(typeof(MyCrazyType), false).ApplyPolicy(ImplicitFields.AllPublic);
    

    (the ImplicitFields stuff already exists, back to v1 days) or maybe just:

    model.Add(typeof(MyCrazyType), ImplicitFields.AllPublic);
    

    any help? does the reasoning make sense?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using C# with .NET 3.5. Is it possible to serialize a block of
Would it be possible to serialize a model object into a query string? I've
I'm wondering if it's possible to de-serialize a generic type into an instance of
Is it possible to serialize data structures (using boost::serialization) into string variable or buffer
possible duplicate: Cannot serialize parameter of type ‘System.Linq.Enumerable… ’ when using WCF, LINQ, JSON
Is it possible to serialize and deserialize a class in C++? I've been using
Is it possible to serialize an object into a string or a byte array
Using Zend_Amf it's possible to serialize php objects to/from Adobe AMF format. Is there
Is it possible to use immutable types as configuration properties with .NET's configuration API?
Is it possible to serialize an ASP.NET web form, including all data that a

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.