Convert JSONC to JSONL
Turn JSONC files into JSONL. Each entry of a top-level list becomes one line of compact JSON, and any other value becomes a single line, with values and key order kept.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop JSONC files on the dialor turn it to pick what to do
One line of JSON for each entry.A top-level list becomes one compact JSON object per line.
What you get
A JSONL file. If the JSONC file holds a top-level list, each entry of the list becomes one line of compact JSON. Values and key order are kept as they are.
Any other value, such as a single object, becomes a single line.
What it drops
Comments are dropped. Trailing commas are dropped too.
The values themselves are not changed, so the data reads the same as in the JSONC file.
Going the other way
To turn lines back into a JSONC file, use JSONL to JSONC. To join several JSONL files into one, you can merge JSONL.
JSONC and JSONL.What each format is.
The formats
JSON with Comments
JSON that allows comments, as in editor and TypeScript configuration files.
- Extensions
- .jsonc
- MIME type
- text
/x -jsonc - Kind
- Text and data
JSON Lines
JSON Lines, one JSON object per line, the format of logs and datasets.
- Extensions
- .jsonl .ndjson
- MIME type
- application
/jsonl - Kind
- Text and data
In your code.The same JSONC to JSONL conversion through the API, for your app or your agent.
$ cv convert report.jsonc report.jsonl$ cv convert report.jsonc report.jsonlQuestions.What people ask about JSONC to JSONL.
If the top level is a list, each entry becomes its own line. Any other top-level value becomes a single line.
Yes. Values and key order are kept.
They are dropped. Trailing commas are dropped as well.
You get one file.