-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why not Protobuff? #6
Comments
I see protobuf and JCOF as serving different goals. Protobuf is a schema-based format with all the pros and cons that entails, and it complicates the build process by requiring a .proto compile step. JCOF is a self-describing schemaless format like JSON, and it's a normal library. One use-case where JCOF is clearly preferable to protobuf is if you already have an application which uses JSON to serialize stuff; replacing Also, if you have an API or something which accepts JCOF, humans can write JCOF documents as plain text just like they can with JSON. Understanding the response is tricker, but that's also pretty doable at least with smaller objects. So it's much more human friendly than protobuf even though it's less human friendly than JSON. Just being a plain-text format is also pretty advantageous in many cases, since it allows copy/pasting. Base64-encoded protobuf would have this advantage too, but most systems which use protobuf won't accept or output base64-encoded protobuf. |
Thanks for the clear answer! Consider adding this to the readme. |
Flippant version: Protobuf is only "self describing" if you're okay with numbers for field names. |
If I'm to lose readability in favour of efficiency, I can as well use a community standard https://github.com/protobufjs/protobuf.js. In which cases JCOF would be preferable?
The text was updated successfully, but these errors were encountered: