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
๐ŸŒ
Medium
galea.medium.com โ€บ how-to-love-jsonl-using-json-line-format-in-your-workflow-b6884f65175b
How to Love jsonl โ€” using JSON Lines in your Workflow | by Alex Galea | Medium
April 9, 2024 - I use jsonl for dumping raw โ€œsource of truthโ€ data. From there it can be loaded in and processed by any part of the application and, if needed, dumped into a relational format (e.g. Postgres, MySQL, CSV). Here are python functions that can be used to write and read jsonl:
Discussions

Python JSON dump / append to .txt with each variable on new line - Stack Overflow
Since you are working with JSON ... outfile.write(',\n') 2021-08-19T15:41:14.437Z+00:00 ... To avoid confusion, paraphrasing both question and answer. I am assuming that user who posted this question wanted to save dictionary type object in JSON file format but when the user used json.dump, this method dumped all its content in one line... More on stackoverflow.com
๐ŸŒ stackoverflow.com
How can I add \n(newline) In Json string
The line with the JSON string is extremely long. Normally you should keep the length of the lines under 80 or under about 100 characters. Backslash in a Python string is a special character. Some examples of characters you want to get and how to write the string (including quotes): More on discuss.python.org
๐ŸŒ discuss.python.org
0
0
September 19, 2022
jsonl format - usage - Prodigy Support
Hi all, I have problems with the .jsonl format (python 3.6.4). After some serious hacking I managed to write a list of dictionaries in jsonl format (converted each list entry to a string) data_list = [{dict1_data}, {dict1_data}, ...] with open(target_file, "w") as fp: for data in data_list: ... More on support.prodi.gy
๐ŸŒ support.prodi.gy
1
August 29, 2018
Python write valid json with newlines to file - Stack Overflow
Valid json expects escaped newline characters to be encoded as '\\n', with two backslashes. I have data that contains newline characters that I want to save to a file. Here's a simplified version: ... More on stackoverflow.com
๐ŸŒ stackoverflow.com
๐ŸŒ
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:
๐ŸŒ
Python
docs.python.org โ€บ 3 โ€บ library โ€บ json.html
JSON encoder and decoder โ€” Python 3.14.3 documentation
3 weeks ago - See Command-line interface for detailed documentation. ... JSON is a subset of YAML 1.2. The JSON produced by this moduleโ€™s default settings (in particular, the default separators value) is also a subset of YAML 1.0 and 1.1. This module can thus also be used as a YAML serializer. ... This moduleโ€™s encoders and decoders preserve input and output order by default. Order is only lost if the underlying containers are unordered. json.dump(obj, fp, *, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, default=None, sort_keys=False, **kw)ยถ
๐ŸŒ
PyPI
pypi.org โ€บ project โ€บ json-lines
json-lines ยท PyPI
Handling broken (cut at some point) files is enabled by passing broken=True to json_lines.reader or json_lines.open. Broken lines are skipped (only logging a warning), and reading continues from the next valid position.
      ยป pip install json-lines
    
Published ย  Nov 21, 2018
Version ย  0.5.0
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ reading-and-writing-json-to-a-file-in-python
Reading and Writing JSON to a File in Python - GeeksforGeeks
It takes two parameters: dictionary: ... indentation ยท After converting the dictionary to a JSON object, simply write it to a file using the "write" function....
Published ย  August 5, 2025
๐ŸŒ
OneUptime
oneuptime.com โ€บ home โ€บ blog โ€บ how to read and write json files in python
How to Read and Write JSON Files in Python
January 25, 2026 - Notice that JSON's true becomes Python's True, and null becomes None. To write Python data to a JSON file, use json.dump():
Find elsewhere
๐ŸŒ
Stack Abuse
stackabuse.com โ€บ reading-and-writing-json-to-a-file-in-python
Reading and Writing JSON to a File in Python
April 18, 2023 - In this guide, we'll take a look at how to read and write JSON data from and to a file in Python, using the json module.
๐ŸŒ
Python.org
discuss.python.org โ€บ python help
How can I add \n(newline) In Json string - Python Help - Discussions on Python.org
September 19, 2022 - In that case It worked fine & proper response was received but while using python requests im passing the same json as a string. I tried to give \n in the end as you suggested but Iโ€™m getting error there. I also tried to give \n which is also giving me same error. ` data = โ€˜{โ€œfirstNameโ€: โ€œJohnโ€}\n [here in postman \n is replaced by entering new line at end of json]โ€™
๐ŸŒ
Real Python
realpython.com โ€บ python-json
Working With JSON Data in Python โ€“ Real Python
August 20, 2025 - The dog_data dictionary contains a bunch of common Python data types as values. For example, a string in line 2, a Boolean in line 3, a NoneType in line 7, and a tuple in line 8, just to name a few. Next, convert dog_data to a JSON-formatted string and back to Python again.
๐ŸŒ
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 - To write JSON objects to your database, you're better off using something like Python. JSONL files are plain text so you can open JSONL in any text editor like notepad++. Each line will be displayed as a JSON ...
๐ŸŒ
Prodigy
support.prodi.gy โ€บ t โ€บ jsonl-format โ€บ 783
jsonl format - usage - Prodigy Support
August 29, 2018 - Hi all, I have problems with the .jsonl format (python 3.6.4). After some serious hacking I managed to write a list of dictionaries in jsonl format (converted each list entry to a string) data_list = [{dict1_data}, {dict1_data}, ...] with open(target_file, "w") as fp: for data in data_list: fp.write(str(data)+ "\n") fp. close() I try to read the file such that I get again the original list with open(source_file, "r") as fp: for data in data_list: data_list fp.rea...
๐ŸŒ
Kaggle
kaggle.com โ€บ code โ€บ nestoranaranjo โ€บ convert-json-to-jsonl-with-python-for-bigquery
Convert json to jsonl with python for BigQuery
Checking your browser before accessing www.kaggle.com ยท Click here if you are not automatically redirected after 5 seconds
๐ŸŒ
Ml-gis-service
ml-gis-service.com โ€บ index.php โ€บ 2022 โ€บ 04 โ€บ 27 โ€บ toolbox-python-list-of-dicts-to-jsonl-json-lines
Toolbox: Python List of Dicts to JSONL (json lines) โ€“ Sp.4ML
April 27, 2022 - It is natural to think about this structure in terms of a Python list of dict(s). It could be a stream of website events with additional properties, for example, user actions or viewed products: {"user": "xyz", "action": "click", "element": "submit button"} {"user": "zla", "action": "products view", "items": ["product a", "product x"]} {"user": "iks", "action": "add to cart", "items": ["product b"], "item properties": {"price": 3.5, "color": "silver"}} ... import gzip import json def dicts_to_jsonl(data_list: list, filename: str, compress: bool = True) -> None: """ Method saves list of dicts into jsonl file.
๐ŸŒ
Jsonlines
jsonlines.org
JSON Lines
This means '\r\n' is also supported because surrounding white space is implicitly ignored when parsing JSON values. Including a line terminator after the last JSON value in a file is strongly recommended but not required. Including a line terminator after every JSON value makes generating and concatenating JSON Lines files easier.
๐ŸŒ
Python Examples
pythonexamples.org โ€บ python-write-json-to-file
Python Write JSON to File
import json aDict = {"a":54, "b":87} jsonString = json.dumps(aDict) jsonFile = open("data.json", "w") jsonFile.write(jsonString) jsonFile.close() Run the above program, and data.json will be created in the working directory. ... In this example, we will convert or dump Python List of Dictionaries to JSON string, and write this JSON string to file named data.json.