I have a case where I receive objects from another module. The object type can be JSON String, dict or of Google Protobuf. I can use isinstance in python to determine whether it is JSON String or dict, but finding it difficult to use isinstance
to check if it is protobuf
. I am not even sure if isinstance
can be used for non-primitive types like Google Protobuf.
So, Is there a way to check the given object is of Google Protobuf type in Python?