writing .proto file for nested structure

29 views
Skip to first unread message

Jay Timbadia

unread,
Jul 30, 2020, 12:09:03 PM7/30/20
to Protocol Buffers
syntax = "proto3";

message request {
    object message = {"source": [1,2,3,4,5], "target": [1,2,3,4,5]}

message response {
    object message = {"source": [1,2,3,4,5], "target": [1,2,3,4,5]}
}

service fetch {
    rpc calculate (request) returns (response) {}
}

I have data input format mentioned up there. 
Can anyone write me a .proto file which will accept such data json from client, process it and send it back in the same format?
Reply all
Reply to author
Forward
0 new messages