in utils.py [0:0]
def read_jsonl(file_path):
"""
Reads a JSONL (JSON Lines) file and returns a list of JSON-serializable objects.
Args:
Path to the JSONL file.
Returns:
List of JSON-serializable objects.
"""
data = []
try:
with open(file_path, 'r', encoding='utf-8') as file:
for line in file:
data.append(json.loads(line.strip()))
except FileNotFoundError:
print(f"File not found: {file_path}")
except json.JSONDecodeError as e:
print(f"Error decoding JSON: {e}")
return data