2 ms·
s,JSON,BSON,g These logs are for machines, and should be compact -- why use JSON at all?
by loeg 15y ago
s,JSON,BSON,g
These logs are for machines, and should be compact -- why use JSON at all?
- CoffeeDregs 15y agoTwo reasons: Easily read by human *and* by machine; Highly compressible since it's full of repeating strings. My Apache logs compress by about 94%. Chances are good that you wouldn't find much of a size difference between gzipped JSON and gzipped BSON (though parsing BSON would be faster).
- loeg 15y agoOne could imagine a "bzoncat" utility which simply reads bson objects on stdin and emits formatted json objects on stdout. I don't know, the difference probably doesn't matter.