You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
service IoTDecoderService {
rpc Decode(IOTDecodeRequests) returns (IOTDecodeResponses);
}
Am trying to implement the serviceImpletation for the data using proto:
i have result of raw_data from IOTDecodeRequest as List[Map[String,Any]] i need to convert it and pass it IOTDecodeResult as google.protobuf.Struct decode
for example :
val rawdata : List[Map[String,Any]] = List(Map("deviceid" -> 860267 , "altitude " -> 0.062),Map("deviceid" -> 860268 , "altitude " -> 0.062))
Please suggest on how to convert it or is there any way to convert it
The text was updated successfully, but these errors were encountered:
Hi @Sumiya92 , it should be fairly straightforward to write a function on your own that iterates over the input and returns a Struct. I encourage you to try writing it :)
Hi @thesamet ,i have written a function for iterating the input but my question was really to construct struct value in scala , am passing Map[string,Any] but the struct required Map[string,Value] , i could not find any examples. any suggestions would be helpful.
Hi Team,
i have proto file
message IOTDecodeRequest {
string id = 1;
string device_id = 2;
string device_parser_id = 3;
bytes raw_data = 4;
}
message IOTDecodeResult {
google.protobuf.Struct decoded = 1;
}
message IOTDecodeResponse {
int32 status = 1;
string id = 2;
IOTDecodeResult result = 3;
IOTDecodeError error = 4;
}
message IOTDecodeError {
int32 code = 1;
string message = 2;
string details = 3;
}
message IOTDecodeRequests {
repeated IOTDecodeRequest requests = 1;
}
message IOTDecodeResponses {
repeated IOTDecodeResponse responses = 2;
}
service IoTDecoderService {
rpc Decode(IOTDecodeRequests) returns (IOTDecodeResponses);
}
Am trying to implement the serviceImpletation for the data using proto:
i have result of raw_data from IOTDecodeRequest as List[Map[String,Any]] i need to convert it and pass it IOTDecodeResult as google.protobuf.Struct decode
for example :
val rawdata : List[Map[String,Any]] = List(Map("deviceid" -> 860267 , "altitude " -> 0.062),Map("deviceid" -> 860268 , "altitude " -> 0.062))
Please suggest on how to convert it or is there any way to convert it
The text was updated successfully, but these errors were encountered: