On Wednesday, July 6, 2016 at 12:06:55 PM UTC-7, Zachary Deretsky wrote: > > Nathaniel, > > my services.py is included, please see below. > I need to populate the variable ma from the file services.json > > Regards, Zach. > > > > #!/usr/bin/env python > > from __future__ import print_function > > from grpc.beta import implementations > > import services_pb2 > > _TIMEOUT_SECONDS = 10 > > > def run(): > m = services_pb2.MedService(service_idx = 15, id = "Some_UIID", name = > "Sample", available = 85) > print(dir(m)) > print(m.ListFields()) > ma = services_pb2.MedServiceArray() > # Need to fill-in ma from the file services.json > If you want to convert a JSON file to a protobuf message, you can use the json_format utility provided by protobuf library: https://github.com/google/protobuf/blob/master/python/google/protobuf/json_format.py#L308
> > > if __name__ == '__main__': > run() > > -- You received this message because you are subscribed to the Google Groups "grpc.io" 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/b54b01a3-815d-45cf-9a27-413d49684ab4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
