4 ms·
> Except nobody’s ever documented the format, That's hardly a JSON problem. You still experience that problem if you adopt any undocumented document format or
by geezerjay 8y ago
> Except nobody’s ever documented the format,
That's hardly a JSON problem. You still experience that problem if you adopt any undocumented document format or schema.
- danmaz74 8y agoI think the point the OP was making was more about the tooling than the format. Having a library that forces you to define the format you're using, instead of dumping to_json whatever internal representation you had, also doubles as documentation. But then, of course, that can be considered boilerplate code (and, in the beginning and most of the time, it actually is just a duplication of your internal object structure).
- bunderbunder 8y agoThat, and having the format definition file support comments means that you have a convenient all-in-one place where, at lest in the more straightforward cases, you can handily describe both the message format and the service's behavior in a single file that's easy to share among all your teams.
- stouset 8y agoPrecisely. The easiest path with JSON is to do none of this, and so the majority of teams (particularly inexperienced ones) do none of it. With protos, someone must at least sit down and authoritatively outline the structure of any data being passed around, so at a minimum you’ll have that. But even just forcing developers to do this generally means they start thinking about the API, and have a much higher chance of documenting the semantics and cleaning up parts that might otherwise have been unclear, confusing, or overly complex.