3 ms·
> JSON text format for metadata It seems like it could be better to use some easier to parse binary format that allows the same flexibility that json does, lik
by codys 9y ago
> JSON text format for metadata
It seems like it could be better to use some easier to parse binary format that allows the same flexibility that json does, like cbor/msgpack/bson.
Using JSON here is a very strange choice.
- cesarb 9y agoAt least it's not XML.
- loeg 9y ago> Using JSON here is a very strange choice. I agree! Perhaps the userspace administrative tool (which links json-c) parses it and converts it to something more like an ioctl struct for the kernel.
- majewsky 9y agoAFAIK the kernel only contains dm-crypt. The whole key handling takes place in userspace, in cryptsetup(1). (If you want to have a bad day, you can send a patch to Linus to put a JSON parser in the kernel.)
- Crontab 9y agoTo me, the worst part is that it introduces a library dependency, which itself can introduce security issues unless they intend to audit it. I don't under this choice at all.
- klodolph 9y agoBSON, despite its name, is really just a format for MongoDB rather than a binary alternative for JSON.
- deleted 9y ago[deleted]
- jwilk 9y agoWhy can't it be both?
- klodolph 9y agoI see no reason why it can't be both, it's just that BSON happens to be a poor format for general interchange, and if you went back and redesigned you could probably fix many of its flaws. I'm a little skeptical though, I would rather just throw it out. It's kind of shitty that it was called BSON, because it falls so far short of the generality that JSON has.