Thanks for your repsonse Feng!
We've ended up doing exactly that in Scala, actually.
Op vrijdag 5 augustus 2016 20:23:30 UTC+2 schreef Feng Xiao:
> On Thu, Aug 4, 2016 at 5:47 AM, Philipp Weissenbacher <
>> Hi all,
>> We are currently implementing a testing library. One goal is to allow the
>> client to test sending and receiving ProtoBuf messages.
>> For this, we need a generic way to create them, without requiring the
>> client to supply the generated proxy classes.
>> This means MyType.getDefaultInstance() (as suggested here
>> would not work.
>> So, is there a generic way to create ProtoBuf messages (e.g. from .proto
>> files) at runtime?
> If you are using C++, you can use the Importer class:
> to parse .proto files to FileDescriptor and then use DynamicMessage to
> create message instances:
> After that you can parse/serialize and manipulate the message instances
> using the reflection API:
>> BTW, we're using Scala/Java and protobuf2.
>> You received this message because you are subscribed to the Google Groups
>> "Protocol Buffers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> To post to this group, send email to prot...@googlegroups.com
>> Visit this group at https://groups.google.com/group/protobuf.
>> For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.