Your input appears to be a sequence of Python objects; it certainly is not valid a JSON document.

If you have a list of Python dictionaries, then all you have to do is dump each entry into a file separately, followed by a newline:

import json

with open('output.jsonl', 'w') as outfile:
    for entry in JSON_file:
        json.dump(entry, outfile)
        outfile.write('\n')

The default configuration for the json module is to output JSON without newlines embedded.

Assuming your A, B and C names are really strings, that would produce:

{"index": 1, "met": "1043205", "no": "A"}
{"index": 2, "met": "000031043206", "no": "B"}
{"index": 3, "met": "0031043207", "no": "C"}

If you started with a JSON document containing a list of entries, just parse that document first with json.load()/json.loads().

Answer from Martijn Pieters on Stack Overflow
🌐
PyPI
pypi.org › project › jsonlines
jsonlines · PyPI
Library with helpers for the jsonlines file format · These details have been verified by PyPI · wbolster · These details have not been verified by PyPI · Homepage · License: BSD License (BSD) Author: wouter bolsterlee · Requires: Python >=3.8 · Development Status ·
      » pip install jsonlines
    
Published   Sep 01, 2023
Version   4.0.0
🌐
Readthedocs
jsonlines.readthedocs.io
jsonlines — jsonlines documentation - Read the Docs
The supported Python versions are 3.8+. ... The convenience function jsonlines.open() takes a file name and returns either a reader or writer, making simple cases extremely simple:
🌐
GitHub
github.com › wbolster › jsonlines
GitHub - wbolster/jsonlines: python library to simplify working with jsonlines and ndjson data
python library to simplify working with jsonlines and ndjson data - wbolster/jsonlines
Starred by 307 users
Forked by 31 users
Languages   Python 100.0% | Python 100.0%
🌐
GitHub
github.com › wbolster › jsonlines › blob › master › jsonlines › jsonlines.py
jsonlines/jsonlines/jsonlines.py at master · wbolster/jsonlines
The resulting reader or writer must be closed after use by the · caller, which will also close the opened file. This can be done by · calling ``.close()``, but the easiest way to ensure proper resource · finalisation is to use a ``with`` block (context manager), e.g. · :: · with jsonlines.open('out.jsonl', mode='w') as writer: writer.write(...) ·
Author   wbolster
🌐
Snyk
snyk.io › advisor › jsonlines › jsonlines code examples
Top 5 jsonlines Code Examples | Snyk
October 13, 2022 - if field in new_data: new_data[field] = string_beautify(new_data[field]) new_data.update(constant_data) new_data["pairID"] = str(pairID) pairID += 1 if pairID % 100 == 0: print("%d sentences generated" % pairID) output_writer.write(new_data) except Exception as e: self.log_exception(e) print(self.get_stack_trace(e)) error_counter += 1 if error_counter > number_to_generate // 5: pass # raise Exception("Over 20\% of samples result in errors. You should fix this.") jsonlines.Writer(output).write_all(generated_data) alexwarstadt / data_generation / utils / data_generator.py View on Github ·
🌐
Snyk
snyk.io › advisor › jsonlines › functions › jsonlines.writer
How to use the jsonlines.Writer function in jsonlines | Snyk
wbolster / jsonlines / tests / test_jsonlines.py View on Github · def test_custom_dumps(): fp = io.BytesIO() writer = jsonlines.Writer(fp, dumps=lambda obj: 'oh hai') with writer: writer.write({}) assert fp.getvalue() == b'oh hai\n'
Find elsewhere
🌐
ProgramCreek
programcreek.com › python › example › 124629 › jsonlines.open
Python Examples of jsonlines.open
February 20, 2024 - def dump_hive_to_json(registry_jhive, output_path, name_key_entry, verbose=False): with jsonlines.open(output_path, mode='w') as writer: for entry in tqdm(registry_jhive.recurse_subkeys(name_key_entry, as_json=True), disable=not verbose): writer.write(attr.asdict(entry))
🌐
Snyk
snyk.io › advisor › jsonlines › functions › jsonlines.jsonlines.writer
How to use the jsonlines.jsonlines.Writer function in jsonlines | Snyk
February 25, 2020 - with jsonlines.open('out.jsonl', mode='w') as writer: writer.write(...) :param file-like fp: name of the file to open :param str mode: whether to open the file for reading (``r``), writing (``w``) or appending (``a``).
🌐
Readthedocs
jsonlines.readthedocs.io › en › latest
jsonlines — jsonlines documentation
The supported Python versions are 3.8+. ... The convenience function jsonlines.open() takes a file name and returns either a reader or writer, making simple cases extremely simple:
🌐
GitHub
github.com › rmoralespp › jsonl
GitHub - rmoralespp/jsonl: A lightweight Python library for handling jsonlines files · GitHub
2 weeks ago - A lightweight, dependency-free Python library for JSON Lines — read, write, compress, and stream with ease. ... jsonl provides a simple, Pythonic API for working with JSON Lines data.
Author   rmoralespp
🌐
GitHub
gist.github.com › luminoso › 0581b7f6760ea9a26b06115c2993f351
jsonlines compressed serialization gz write file · GitHub
October 24, 2024 - jsonlines compressed serialization gz write file · Raw · serialize_jsolines_gz.py · 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.
🌐
Softhints
softhints.com › python-convert-json-to-json-lines
Python convert normal JSON to JSON separated lines 3 examples - Softhints
January 3, 2026 - Documentation of this package is here: jsonlines is a Python library to simplify working with jsonlines and ndjson data. Example how to convert the normal JSON file to line separated: import jsonlines import json with open('/home/user/data/...
🌐
PyPI
pypi.org › project › jsonline
jsonline · PyPI
Jsonline is a Python library for efficiently working with JSON Lines files.
      » pip install jsonline
    
Published   Aug 11, 2025
Version   0.3.1
🌐
Rowzero
rowzero.com › blog › open-jsonl-file-format
Easily Open JSONL Files - Guide to JSON Lines Format - Row Zero – the spreadsheet for modern cloud data
October 24, 2024 - It's easy to create JSONL in Python programmatically. Here's example code: import jsonlines data = [{"name": "John", "age": 30}, {"name": "Anna", "age": 22}] with jsonlines.open('output.jsonl', mode='w') as writer: writer.write_all(data)
🌐
Python
bugs.python.org › issue31553
Issue 31553: Extend json.tool to handle jsonlines (with a flag) - Python tracker
This issue tracker has been migrated to GitHub, and is currently read-only. For more information, see the GitHub FAQs in the Python's Developer Guide · This issue has been migrated to GitHub: https://github.com/python/cpython/issues/75734
🌐
GitHub
gist.github.com › sigma23 › a808c57c30ad87bc0b705a61755bd91b
Convert from json array to jsonlines using jq and python · GitHub
Convert from json array to jsonlines using jq and python - covert_json_array_to_jsonlines_jq_or_python.txt