# NDJSON converter

Convert between a JSON array and newline-delimited JSON (NDJSON, JSON Lines).

- Endpoint: `POST https://setget.net/v1/tools/ndjson-convert` with JSON `{"input": {...}}`
- MCP: `run_tool` with `slug` = `ndjson-convert`
- Page: https://setget.net/tools/ndjson-convert

## Inputs

- `text` (required, string): A JSON array, or NDJSON with one value per line.
- `to` (optional, string, one of `auto`, `ndjson`, `json`, default `"auto"`): Output format.

## Example 1

```json
{"input":{"text":"[{\"a\":1},{\"a\":2}]"}}
```

Result:

```json
{"text":"{\"a\":1}\n{\"a\":2}\n","format":"ndjson","records":2}
```

## Example 2

```json
{"input":{"text":"{\"a\":1}\n{\"a\":2}","to":"json"}}
```

Result:

```json
{"text":"[{\"a\":1},{\"a\":2}]","format":"json","records":2}
```
