I use db.model_to_protobuf for my AppEngine project, I wonder if is there a way to tell a string is encoded from db.model_to_protobuf? I have no time to read the source cod开发者_运维百科e, can anyone give me a favour?
Thanks~
In principle, yes - the protocol buffer encoding format is documented here. In practice, this is a terrible idea: you should use metadata to identify the format of your data, and decode it based on that, not based on trying to guess the content type.
精彩评论