The protobuf message is internally ambiguous unless you have a .proto schema (or can output a schema), because (for example) a wired string type can represent:
- utf-8 string
- Blob
- sub-message
- packed array
A similar ambiguity exists for all types of conductors (except, possibly, βgroupsβ).
My recommendation would be to run it through the existing deserialization process (compared to the type model you supposedly got in the project) to get an object model suitable for validation. From the object model, you have all the usual options - reflection, serialization via XmlSerializer / JavaScriptSerializer , etc.
If all you have is raw data, there is a plughar plugin that can help, or protobuf-net there is a ProtoReader class that can be useful for parsing such a stream; but here the focus is on the fact that the flow is difficult to describe in isolation.
source share