The JSON:


"foo": {

      "Unknown1":[{"field1": "value1", "field2": "value2"}],
      "bar":[{"field1": "value1", "field2": "value2"}]
  }


My essential problem is that at compile time the name and type of the field 
"Unknown1" is not know. This field name and type needs to be dynamic at run 
time so that any JSON value put into it will parse and can then be accessed 
via 'foo.Unknown1()'


Is this possible?


Some additional information: 


   - I have tried a number of possibilities such as extensions, 
   google.protobuf.Any, dynamic_message and none worked how I needed them to
   - I am currently using a proto2 but I can upgrade to proto3 if there is 
   a way to achieve this in proto3 but not proto2
   - I am working in C++ so I would prefer any C++ examples if possible


Thanks in Advance,
Daniel

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to