0

I have this grpc response:

elem {'a': 1, 'b': 2}
elem {'a': 5, 'b': 10}

I want to make it as

[
  {'a': 1, 'b': 2},
  {'a': 5, 'b': 10}
]

How to do it in my flask project?

TERMINATOR
  • 1,180
  • 1
  • 11
  • 24
A.Sana
  • 95
  • 2
  • 14

1 Answers1

0

You can try this response object to get the object list:

message Response{
  repeated Element elem = 1;
}
message Element {
  int32 a = 1;
  int32 b = 2;
}
J.F.
  • 13,927
  • 9
  • 27
  • 65