News for hackers. Stuff that matters.
Re:Son: A minimal subset of JSON for machine-to-machine comm... by maltalex on Sunday December 10, 2017 @11:18AM (#15892037)
> Before looking for something 'better' than JSON, build a basic prototype of your app and see if your application actually needs to use something else.

That implies that JSON is somehow the gold standard of serialization formats. I don't see it that way. The fact that JSON is ubiquitous in some areas doesn't mean that it's the gold standard for all other uses.

In my experience, protobufs are easy to work with, concise, safe, and efficient. There's never any ambiguity to them, and both creating and parsing messages is fast and easy. That doesn't mean that there aren't cases in which JSONs aren't a better choice, for instance when working with browsers, or needing a text based format for debugging or inspection purposes.

> Protocol buffers are very clever and really cool but using them where you don't need them is a huge waste of effort.

In my experience protobufs require very little effort, with most of the effort being put into defining the schema. It's pretty frictionless afterwards with one notable exception - when you want to manually inspect a message. That's where JSON wins hands down.

Re:Son: A minimal subset of JSON for machine-to-machine comm... by onion2k on Sunday December 10, 2017 @02:30PM (#15893049)
That implies that JSON is somehow the gold standard of serialization formats.

I'm not suggesting JSON is the best format, because that depends on the project you're working on. I'm saying it's good enough for most tasks, and has ubituous support, and it's easy to work with. There are better formats for particular use cases but if your application has requirements that can work with JSON it probably isn't worth finding something else.

Re:Son: A minimal subset of JSON for machine-to-machine comm... by skybrian on Sunday December 10, 2017 @04:34PM (#15893612)
Protobufs do require more effort in the toolchain. Pretty much the only way to parse a .proto file is with protoc and you might need to build it from source. So you need to run the C++ compiler and depending in the build system you're using, adding a dependency on protoc at build time can be a pain.

Contrast with JSON where every decent language ecosystem has a parser readily available. That's what makes it the "gold standard" for me.

Re:Son: A minimal subset of JSON for machine-to-machine comm... by cdancette on Sunday December 10, 2017 @12:18PM (#15892333)
Protobuf seems more complicated to debug manually.