5 ms·
A drawback of JSONL (and JSON) for me is that you can't have trailing commas. If the format allows for that, and ignores trailing commas at the end of the line
by slashdev 3y ago
A drawback of JSONL (and JSON) for me is that you can't have trailing commas. If the format allows for that, and ignores trailing commas at the end of the line you can stream and parse line-by-line, but you can also take any arbitrary group of lines, wrap them in [], again stripping the last comma (arghh!), and parse it with any standard JSON parser.
For example, Datadog doesn't ingest JSONL, so if you have JSONL log files you'll have to convert it to JSON first, you can't just use sendfile to upload your log in chunks, just wrapping it with [ and ] (which can be done with ordinary writes before and after sendfile.)