You can use the Any type with any proto message.Since PersonFilter is now a proto message and not any java class, it should definetly work. You should also check the type of the any before deserializing it if you want to support multiple ones. Not sure how this looks like in Java since I'm mostly working with C#, but as Carl already said, the message type is encoded as string and therefore the dumbest way would be a string comparison to the full name of the message type.
If you only have PersonFilter and don't need the flexibility, you should definetly use PersonFilter as type of the field and not bytes or Any. This makes usability of the API a lot easier and safer. -- 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]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/e726fa33-fe33-4fe0-85a8-a85dcca7459c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
