Questions tagged [protobuf-net]

An independent implementation of Google's protobuf binary serialization format, protobuf-net approaches the problem-space with common .NET coding styles, but retaining the high performance, dense output and cross-platform interoperability.

An independent implementation of Google's protobuf binary serialization format, protobuf-net approaches the problem-space with common .NET coding styles, but retaining the high performance, dense output and cross-platform interoperability. It's compatible with most of the .NET family, including .NET 2.0/3.0/3.5, .NET CF 2.0/3.5, Mono 2.x, Silverlight 2, etc.

In particular (compared to most implementations), it allows:

  • both code-first and contract-first development
  • mutable objects
  • inheritance

Oh, and it is pretty darned fast too.

Resources

1771 questions
1
vote
2 answers

Can an implementation of Protobuf-Net beat what I currently have?

I posted a related but still different question regarding Protobuf-Net before, so here goes: I wonder whether someone (esp. Marc) could comment on which of the following would most likely be faster: (a) I currently store serialized built-in…
Matt
  • 7,004
  • 11
  • 71
  • 117
1
vote
1 answer

Protobuf-net Runtime serialization

[ProtoContract] public abstract class Animal { [ProtoMember(1)] public abstract string Type { get; set; } [ProtoMember(2)] public string Name { get; set; } [ProtoMember(3)] public int Likeability { get; set; } } public class…
kalki
  • 516
  • 2
  • 10
1
vote
1 answer

ProtoBuf DeepClone Returns Empty Object When Not Using Surrogate

I'm using protobuf-net v2 and have a class that inherits "List" that I wan't to serialize/clone. when I'm calling "DeepClone" (or deserialize) I'm getting the cloned object empty. I can serialize the object into file and it seems to be serialized as…
Tamir
  • 3,833
  • 3
  • 32
  • 41
1
vote
1 answer

Protobuf Net and storing/retrieving data blobs to/from binary file

I am trying to figure out whether I can use protobuf-net to store and retrieve the following serialized data structure: I have about 200,000 objects of size 16 bytes (the object contains one long and two floating type values, 8 byte plus 2 * 4…
Matt
  • 7,004
  • 11
  • 71
  • 117
1
vote
1 answer

Update protobuf after it has been serialized

We are saving protobufs inside database tables as Byte[]s. However, we are running into a situation where we have to update the protobufs after they have been saved. This is creating two problems - (1) we have to serialize/ deserialize them to…
Manish
  • 1,726
  • 3
  • 23
  • 29
1
vote
1 answer

WCF protobuf-net not showing help page

Basic WCF service project including protobuf-net .dll library. Open web browser and go to localhost/wcf/service1.svc, everything ok. Now go to localhost/wcf/service1.svc/help, shows 400 Bad Request on browser console (like firebug). Here's the…
SamuGG
  • 479
  • 2
  • 8
  • 20
1
vote
0 answers

Protobuf and entity framework - included entities serialization

I am not able to serialize nested entities. This is my transfer object [ProtoContract] [Serializable] [DataContract] public class MyClassTO { [ProtoMember(1)] [DataMember] public List ListOfMyEntities {get;set;}; } On my…
ADE
  • 31
  • 3
1
vote
1 answer

ProtoBuf-Net class inheritance in VB.net

I have two classes A and B. Class B inherits class A as shown below. Public Class A Public Property ID As Integer Public Property Name() As String = String.Empty End…
1
vote
2 answers

Protobuf-net serialize byte[] data with '00' before each byte

I am using Visual Studio 2005 with .Net20 version of protobuf-net r480. I try to follow an example and serialize a class with string, enum, int, and byte[] data as below [ProtoContract] public class Proto_DemoMessage { public enum ESSCommandType…
Marco2
  • 13
  • 4
1
vote
1 answer

does protobuf-net support multiple interface inheritance

I think my question is very similar to this question: Protobuf-net creating typemodel with interface and abstract baseclass however the solution given by Marc here, essentially reduces the multiple inheritance of an abstract class and interface down…
Joe
  • 11,147
  • 7
  • 49
  • 60
1
vote
1 answer

Specifying command line options to protogen from inside the IDE?

I am using Visual Studio 2008 and I wonder if there is a way to specify -p:detectMissing when running the ProtoBufTool custom tool. Found nothing on the web about it. Do I have to stick to calling protogen from the command prompt (or wrap protogen…
Simon
  • 453
  • 5
  • 14
1
vote
1 answer

ProtoBuf-Net Performance

In the example below: Would Class1 serialization take almost twice as long as Class2 serialization? Or would protobuf-net handle the byte[] in Class1 as already serialized data? Pseudo example: [ProtoContract] class Class1 { [ProtoMember(1)] …
1
vote
2 answers

Java Protobuf (ver. 2.4.1) and Protobuf-net (ver. r480) inheritance compatibility

Is it possible with Java Protobuf deserialize the following DerivedMessage serialized with Protobuf-net? namespace Test.Protobuf { [ProtoBuf.ProtoContract] [ProtoBuf.ProtoInclude(2550, "Test.Protobuf.DerivedMessage")] class BaseMessage { …
1
vote
1 answer

interleave protobuf-net and file

I need to exchange both protobuf-net objects and files between computers and am trying to figure out the best way to do that. Is there a way for A to inform B that the object that follows is a protobuf or a file? Alternately, when a file is…
Manish
  • 1,726
  • 3
  • 23
  • 29
1
vote
1 answer

Serialize hashtable using Protocol Buffers (.NET)

I am trying to serialize/deserialize my custom class which contains hashtable property using protobuf-net v2. [ProtoContract] public class MyClass { [ProtoMember(1)] public Hashtable MyHashTable { get; set; } } When I…
1 2 3
99
100