JSONL to array
jsonl-to-array · version 1.0.0 · JSON & JSONL · free, no key needed
Parse strict JSON Lines text into an array of JSON-safe values.
Use when you need to: jsonl to array · parse json lines into an array · convert jsonl to json array.
Supported
- jsonl to array
- parse json lines into an array
- convert jsonl to json array
Not supported
- JSONL comments
- NDJSON with blank lines
- concatenated JSON without newlines
- streaming parse
- read files
Behavior
- text is strict JSON Lines split on CRLF, CR, or LF.
- A trailing empty segment after a final newline is ignored; internal empty lines are rejected.
- Empty text or only a trailing newline yields an empty values array.
- At most 5000 lines are accepted.
- Each line is parsed with JSON.parse and must be a JSON-safe value: object, array, string, boolean, null, or safe integer.
- Parsed objects are rebuilt with a null prototype; prototype-like own keys are ordinary keys.
- Output values appear in file order.
Input
text(string, required): max length 256000
Output
values(array of any, required): max items 5000
Limits
- max input bytes: 256000
- max lines: 5000
Example
Request input:
{
"text": "{\"name\":\"Ada\",\"ok\":true}\n\"שלום\"\n0\nnull\n"
}
Response:
{
"result": {
"values": [
{
"name": "Ada",
"ok": true
},
"שלום",
0,
null
]
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "jsonl-to-array",
"version": "1.0.0",
"input": {
"text": "{\"name\":\"Ada\",\"ok\":true}\n\"שלום\"\n0\nnull\n"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/jsonl-to-array/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"text":"{\"name\":\"Ada\",\"ok\":true}\n\"שלום\"\n0\nnull\n"}'
The machine-readable contract is at /v1/tools/jsonl-to-array/versions/1.0.0.
CLI
node cli.mjs run jsonl-to-array 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Array to JSONL: Serialize an array of JSON-safe values as JSON Lines text.
- JSON array index by: Convert an array of objects into a single object indexed by a specific key.
- JSON flatten: Flatten a JSON value into a null-prototype map keyed by RFC 6901 JSON Pointers.
- JSON to CSV: Serialize string-valued JSON rows to CSV using explicit ordered columns.
- JSONL validate: Validate strict JSON Lines text and report the value count and UTF-8 byte length.
- JSON array anti join: Anti join two JSON arrays of objects on exact keys.