开发者

How can I tell a string is encoded from db.model_to_protobuf

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜