Reputation: 905
I am looking for. Analog of C # MessageDescriptor Parser in Python. For example. I am trying port this C# code to Python. But unfortunately in python implementation of MessageDescriptor is not field Parser. How I can get parser in Python implementation
foreach (var msg in fd.MessageTypes)
{
var name = fd.Package + "." + msg.Name;
TypeLookup.Add(name, msg.Parser);
}
Upvotes: 0
Views: 123
Reputation: 36
In python, you can call msg.ParseFromString() directly on the message.
Upvotes: 1