{"uid":"cap_PYtOdDymMO5J9tuehpj0v","slug":"json-array-to-ndjson-converter-5b785916","name":"JSON Array to NDJSON Converter","description":"JSON array to NDJSON. POST a JSON array; the response is one compact JSON value per line — the shape streaming loaders, log shippers and jq pipelines take. A non-array input is refused rather than emitted as a stream of one, because that is the mistake this endpoint exists to catch.","url":"https://toolshed.lemon-agent.dev/convert/json-ndjson","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"string","maxLength":262144,"description":"the raw JSON file as the request body, up to 256 KB"},"type":{"type":"string","const":"http"},"method":{"type":"string","const":"POST"},"bodyType":{"type":"string","const":"text"}},"additionalProperties":false},"output":{"type":"object","required":["type","format"],"properties":{"type":{"type":"string","const":"text"},"format":{"type":"string","const":"application/x-ndjson","description":"the converted NDJSON file as the response body (application/x-ndjson)"},"example":{"type":"string","description":"the sample request body above, converted — what a the converted NDJSON file as the response body (application/x-ndjson) looks like"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_LRSlupfJJATu9476_OcGN","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts a JSON array into Newline Delimited JSON (NDJSON), emitting one compact JSON value per line; rejects non-array inputs explicitly.","exampleAgentPrompt":"I have a JSON array of user records and I need it converted to NDJSON — one compact JSON object per line — so I can pipe it into my log shipper. Can you run the conversion?","exampleUseCases":[{"title":"Preparing data for log shipper","prompt":"I've got a JSON array of server events that I need to feed into my log shipping pipeline. Convert it to NDJSON so each event is on its own line."},{"title":"Feeding jq pipeline with streaming data","prompt":"I need to process a large JSON array with jq but it only works line by line. Can you convert this JSON array into NDJSON format for me?"},{"title":"Validating array before streaming","prompt":"I'm not sure if my data file is a proper JSON array or a single object — can you try converting it to NDJSON and tell me if it's in the right shape? Here's the raw JSON."}],"resultDescription":"A plain-text response in application/x-ndjson format where each line is a single compact JSON value from the original array. If the input is not a JSON array, the request is rejected with an error rather than emitting a single-line stream.","failureModes":["Non-array JSON input (object, string, number) is rejected with an error — the endpoint does not treat it as a single-element stream","Input exceeds 256 KB limit — request is refused","Malformed JSON that cannot be parsed returns an error","Empty array may return an empty response body"],"whenToPreferThis":"Use this endpoint when you need to reliably convert a JSON array into NDJSON and want strict validation that the input is actually an array (not silently wrapping a single object). Prefer it over generic format converters when your downstream consumers are streaming loaders, log shippers, or jq pipelines that require the NDJSON line-per-record format. It pairs naturally with the sibling NDJSON-to-JSON-array endpoint for round-trip workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:41:36.490Z","isFirstParty":false}