Skip to content

Instantly share code, notes, and snippets.

@fsndzomga
Created March 5, 2024 20:56
Show Gist options
  • Save fsndzomga/ca64e8344c3d810bdda1c08faa6183bf to your computer and use it in GitHub Desktop.
Save fsndzomga/ca64e8344c3d810bdda1c08faa6183bf to your computer and use it in GitHub Desktop.
import json
# Load JSON data from mypoems.json
with open('mypoems.json', 'r') as json_file:
json_data = json.load(json_file)
# Conversion from JSON to JSONL
with open('mypoems.jsonl', 'w') as f:
for entry in json_data:
json_str = json.dumps(entry)
f.write(json_str + '\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment