Hi,
I currently trying to parse a json array to protobuf
using JsonStringToMessage method.
Example Json:
[
{
Name:"Bob",
Age:24
},
{
Name:"John",
Age:12
},
{
Name:"Pat",
Age:64
}
]
Example Proto:
syntax = "proto3";
message Person{
string name = 1 [json_name = "Name"];
int32 age= 2 [json_name = "Age"];
}
message PersonList{
repeated Person personList = 1;
}
Currently this throws an error "INVALID_ARGUMENT:: Root element must be a
message.". Is there a way to setup a protobuf to allows an anonymous json
root?
--
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.