Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wouldn't they be a pain to debug, given that they are binary? I wouldn't want to use a hex editor to verify if my data serializes properly.


I am not sure, exactly what do you mean by "verifying" that your data serializes properly?

Do you mean that you don't trust the protobuf implementation itself to write the correct bytes, or are you worried you may have written the proto file wrong?

If it's the first case, protobuf is a widely used format that has been rigorously tested in the field. Provided you use it for a major language, you should be fine.

If it's the second case - could you not just serialize and then deserialize, and check that the objects that pop out again are the same as the ones that you sent in?


There is a robust though mostly undocumented text format.

I've even seen Google projects use text protos for config files.

Or to decode binary files, use the protoc tool.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: