Convert JSON array to JSON lines (JSONL / NDJSON / LDJSON)

Want to convert JSON array to JSON lines (JSONL / NDJSON / LDJSON)?

Try Withdata Data File Converter, a desktop JSON converter for Windows, MacOS, and Linux, Convert JSON array to JSON lines, Easy and Fast.

  • Can run in GUI mode, Step by Step, just a few mouse clicks.
  • Can run in Command line, for Scheduled Tasks and Streams.
  • Convert files locally, Avoid uploading LARGE JSON file(s) to online services.

Download Withdata DataFileConverter Download DataFileConverter

JSON Lines text format, also called newline-delimited JSON (NDJSON), or Line-delimited JSON (LDJSON). JSON Lines files may be saved with the file extension .jsonl, *.ndjson, *.ldjson.

Convert JSON array to JSON lines (JSONL / NDJSON / LDJSON)

Choose JSON array file -> Set target JSON Lines (JSONL / NDJSON / LDJSON) file -> Convert JSON array to JSON lines (JSONL / NDJSON / LDJSON)

Click “Start a New Convert” at task dialog.

Convert JSON array to JSONL - task window

then show the wizard.

Select source/target file type.

Convert JSON array to JSONL - select type

1. Open a JSON array file.

Convert JSON array to NDJSON array - open JSON lines file

The JSON array:

Convert JSON array to NDJSON array - JSON lines content

2. Config target JSON Lines (JSONL / NDJSON / LDJSON) file.

Convert JSON array to LDJSON array - config JSON array file

3. Set rows options.

Convert JSON array to JSONL - summary

4. Convert JSON array to JSON lines (JSONL / NDJSON / LDJSON).

Convert JSON array to NDJSON - convert

See JSON lines file

Convert JSON array to LDJSON array - view  JSON array file

Convert JSON array to JSON lines (JSONL / NDJSON / LDJSON) in command line

Set scheduled tasks for converting JSON array to JSON lines (JSONL / NDJSON / LDJSON)

You can schedule and automate this converting task by:

  1. Save session and create .bat (Windows) or .sh (Linux/macOS) file for “JSON array to JSON lines” conversion.
  2. Set scheduled task for “JSON array to JSON lines” conversion.

FAQ

What is Withdata DataFileConverter?
How long does it take to convert JSON array to JSON lines?
Is it safe to convert JSON array to JSON lines using DataFileConverter?
Can I convert JSON array to JSON lines on Linux, Mac OS?
Can I convert JSON array to JSON lines in command line?

More about Withdata DataFileConverter – JSON array to JSON lines (JSONL / NDJSON / LDJSON) Converter

JSON Array → JSON Lines reference

Type mapping

Value kindin JSON Arrayin JSON Lines
Long text"multi-line\ntext" (escaped newline inside a string)"multi-line\ntext"
JSONnested object or array, kept as structurenested object on the same line

Dialect differences

Both JSON Array and JSON Lines are file formats, so what differs below is how each one chooses to represent a value.

Propertyin JSON Arrayin JSON Lines
identifiersDouble quotes; backslash escapesDouble quotes; backslash escapes (a newline inside a string...
datesNo date type: dates arrive as strings and the reader must p...No date type: dates arrive as strings
separatorBraces and commasNewline between records
typingstring, number, boolean, null, object, array - no date typeSame as JSON, but records cannot nest across lines
shapeNested objects and arraysFlat stream
ceilingWhole document is usually parsed into memoryStreams, so it scales past what a single JSON document can ...

Data File Converter without the manual work

For batch jobs, large files and scheduling use the Data File Converter converter — an offline desktop app for Windows, Linux and macOS. Free trial.


Posted

in

by