Created
March 5, 2024 20:56
-
-
Save fsndzomga/ca64e8344c3d810bdda1c08faa6183bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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