I have some code set up like this:
const Descriptor* msg_desc = pool->FindMessageTypeByName(class_name);
Message* dm = dmf.GetPrototype(msg_desc)->New();
string str(serialized, length);
bool success = dm->ParseFromString(str);
which outputs the DebugString:
1: Kimberly Ann Hart
2: Amy Jo Johnson
CharacterName: Kimberly Ann Hart
ActressName: Amy Jo Johnson
I've noticed that if I get the descriptor use the types provided by the
compiled file, e.g.
const Descriptor* msg_desc = pr.GetDescriptor();
The debug string will not have any unknown fields. I've checked the pool,
which has the file "powerranger.proto," which leads me to believe that
FindMessageTypeByName is losing info. However,
the source says:
// These find descriptors by fully-qualified name. These will find both
// top-level descriptors and nested descriptors. They return NULL if not
Does anyone know why this is happening or how I can get the full
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 http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.