News for hackers. Stuff that matters.
Re:Parsing gigabytes of JSON per second by EwanToo on Saturday October 23, 2021 @07:36AM (#28967472)
I largely agree, but most modern binary formats are more rigid with schemas and types.

If you want the flexibility of JSON, I'm not sure you'll end up with something massively different from gzipped JSON

Re:Parsing gigabytes of JSON per second by the8472 on Saturday October 23, 2021 @10:43AM (#28968988)
Converting a text format to a compact in-memory data structure takes extra CPU cycles. (de)compression takes extra cycles. The point of using a binary format is to achieve the same result while avoiding that overhead. For some data formats compression also has the downside that it prevents seeking.
Re:Parsing gigabytes of JSON per second by lifthrasiir on Saturday October 23, 2021 @07:51AM (#28967565)
JSON doesn't allow any custom type, so it is not "flexible" per se. Therefore you only need a format that supports the JSON data model and pretty much nothing else; CBOR [1] for example almost surely fits the bill.

[1] https://cbor.io/

Re:Parsing gigabytes of JSON per second by kevin_thibedeau on Saturday October 23, 2021 @07:07PM (#28973262)
Serialized binary encodings don't require a schema. They can have all the expressability of JSON and more.
Re:Parsing gigabytes of JSON per second by Waterluvian on Saturday October 23, 2021 @07:47AM (#28967542)
That’s an interesting thought. I am now very fascinated by what kind of data would be gigs in size but would need the flexibility of JSON.
Re:Parsing gigabytes of JSON per second by maccard on Saturday October 23, 2021 @05:16PM (#28972362)
Datasets are not always provided by you; if your data source outputs json it doesn't matter why. Also just because your volume of data is measured in gigabytes, that doesn't mean it's a singular stream. As an example you could be handling tens of thousands of small requests.