4 ms·
> For that use case Protobufs are much better than XML and have a schema though it's a binary format, so not usable for conf files. There's a canonical JSON re
by xyzzy_plugh 3y ago
> For that use case Protobufs are much better than XML and have a schema though it's a binary format, so not usable for conf files.
There's a canonical JSON representation that is widely supported: https://protobuf.dev/programming-guides/proto3/#json https://protobuf.dev/programming-guides/proto3/#json
Since JSON is a subset of YAML, you can also make YAML work.
There is also a text format which lies somewhere between YAML and JSON: https://protobuf.dev/reference/protobuf/textformat-spec/ https://protobuf.dev/reference/protobuf/textformat-spec/
- nemo 3y agoYes, that's very true. I actually have used json representation at previous gigs, I just wasn't up to adding the extra qualifiers. Whenever I've needed to use Protobufs, I've always found them very nice work, really. I certainly have a much warmer opinion of them than XML.