-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
This is related to supporting raw bytes - #229
Any type is similar - it's just bytes plus a url describing the type.
https://github.com/protobuf-net/protobuf-net/blob/main/src/protobuf-net.Reflection/google/protobuf/any.proto
An ideal implementation would make this transparent to the user, for example, in your json your response might be:
"response": {
"name": "notEmpty('Big Tree')",
"location": {
"latitude": "matching(number, 180)",
"longitude": "matching(number, 200)"
}
}
but in your proto the type of response is defined as Any. The framework can then take those input bytes, find the corresponding proto with which to decode them, and use that decoded proto for matching.
The client shouldn't need to specify that the field is Any in the response really, unless I'm missing something
Metadata
Metadata
Assignees
Labels
No labels