I am trying to create a dictionary as part of my message and I would like 
to have multiple keys for the dictionary. Here's what my message currently 
looks like:

message User {

string name = 1;
 
string manager = 2;

string id = 3;

map<string, string> metadata = 4;

}


In the metadata field I would like to save the following data:

metadata_info = {
"sync_direction": "OUTBOUND",
"status": "UNCONFIRMED",
}


What is the best way to save my metadata_info to the metadata field in my 
User message? Should I just use setattr(message, "metadata", metadata_info) 
to accomplish this? I am currently using Proto3 and Python3 at the moment. 

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/0fa75153-eaf6-4536-89ec-05ca3d57e18c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to