diff --git a/opteryx/utils/file_decoders.py b/opteryx/utils/file_decoders.py index 43249014..58656bda 100644 --- a/opteryx/utils/file_decoders.py +++ b/opteryx/utils/file_decoders.py @@ -326,12 +326,10 @@ def jsonl_decoder( if not isinstance(buffer, bytes): buffer = buffer.read() - parser = simdjson.Parser() - for line in buffer.split(b"\n"): if not line: continue - dict_line = parser.parse(line) + dict_line = simdjson.Parser().parse(line) rows.append( {k: orjson.dumps(v) if isinstance(v, dict) else v for k, v in dict_line.items()} )