Jonathan Robie wrote:
OK, I see the problem now.

There's a text representation:

http://code.google.com/apis/protocolbuffers/docs/overview.html

# Textual representation of a protocol buffer.
# This is *not* the binary format used on the wire.
person {
 name: "John Doe"
 email: "[email protected]"
}


But this is not what actually goes over the wire. And what goes over the wire does not include the names. To quote the above overview:

XML is also – to some extent – self-describing. A protocol buffer is only meaningful if you have the message definition (the |.proto| file).

So I agree with John. The native PB format doesn't contain the names we need to query them. The text format does, but this is not the native format.

This doesn't mean you can't do it, simply that you would need some sort of header to indicate what kind of protocol buffer the message contains. For example you could include a header that references a published .proto file, much like an XML document references a dtd or schema.

--Rafael


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to