What sort of restrictions are in the Google protobuf spec? Is this possible
as a user-extension of the protobuf-net library? eg. Could I create an
object surrogate, serializing the name of the derived type as a string, then
dynamically read/write the type to the stream based on the type string? Or
does the spec make this not possible because it forces a static message
structure?

 

Thanks!

 

 

From: Marc Gravell [mailto:marc.grav...@gmail.com] 
Sent: 31 January 2011 01:06
To: NYCBrit
Cc: Protocol Buffers
Subject: Re: [protobuf] Serializing Dictionary<string,object>

 

I assume you mean with protobuf-net there; in which case, no.

 

Because protobuf-net follows the general protobuf spec, there is no
type-specific metadata that would allow me to encode/decode an arbitrary
object, or to store the details of which type of object is stored. 

 

Marc (protobuf-net)

On 29 January 2011 16:03, NYCBrit <richard...@gmail.com> wrote:

Is it possible to serialize a Dictionary<string,object> where all the
objects are pointing to classes marked up with [ProtoContract]?

--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to
protobuf+unsubscr...@googlegroups.com
<mailto:protobuf%2bunsubscr...@googlegroups.com> .
For more options, visit this group at
http://groups.google.com/group/protobuf?hl=en.




-- 
Regards, 

Marc

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to