Suppose in some json formatted schema I have "foo": [[12, 34],[56,78]]. I 
know I could do 
message foo_sub{
  repeated int value = 1;
}

message Document{
  repeated foo_sub foo = 1;
}
But if I directly convert this into json, it will be:
"foo":[{"value":[12, 34]}, {"value":[56,78]}]

While, in terms of information, these are equivalent, using the protobuf3 
json conversion function, it doesn't produce quite the same json as the 
initial kind. 

Is there a way to do this kind of functionality? To an arbitrary depth of 
arrays? 

Suppose I write a custom protobuf to json string function, instead of 
relying on the included one. Suppose that this 'foo' field is a message in 
a larger protobuf that gets translated into a json string. Is there a way 
to tell that larger protobuf to use the custom function I made for its 
sub-message?

-- 
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