I generated a message with declaration below

message pairs {
   optional string key = 1;
   optional string val = 2;
}

message Object {
repeated pairs Pair = 1;
}

I have two arrays. array1 = [key1, key2, key3]
and array2 = [value1, value2, value3, value4]

I can parse through only one array at a time. how can i dynamically
add messages so that in the first pass, I add the appropriate amount
of repeated messages to the 'Object' message and set their 'key'
values from array1 and then while parsing the second array, I check if
the appropriate number of repeated messages have been added values
have been already set and if so, just add the 'value' object from
array 2.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to