[protobuf] Dynamic deserialization of enums

2011-06-18 Thread Nik Hodgkinson
I'm working on a system to serialize descriptors and send them over the wire. All has gone fairly well with the exception of enums. I have no problem serializing the descriptor or deserializing it on the receiving end, but when I try to read from one I get an object like com.google.protobuf.Des

Re: [protobuf] Dynamic deserialization of enums

2011-06-21 Thread Pherl Liu
This is because EnumValueDescriptor doesn't override toString(). You can use getName() and getValue() in the EnumValueDescriptor to read the value. EnumValueDescriptor is defined in com.google.protobuf.Descriptors On Sun, Jun 19, 2011 at 10:34 AM, Nik Hodgkinson <11x...@gmail.com> wrote: > I'm wo