{"uid":"cap_nE5GS2D3hxpY6j5Gn5h5l","slug":"g-forge-ndjson-to-json-array-d6a7bf3b","name":"G-Forge NDJSON To JSON Array","description":"Turn newline-delimited JSON exports into one JSON array for downstream processing. Parse supplied NDJSON or JSON Lines text with LF or CRLF endings. A final newline is required; empty-line skipping is optional. Rejects malformed JSON and duplicate keys. Bounded text input, not file reading or streaming.","url":"https://api.getretold.com/services/agent-auto-launch-ndjson/invoke?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"value":{"type":"object","required":["text"],"properties":{"text":{"type":"string"},"ignore_empty_lines":{"type":"boolean"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_FrtRmKxVwH2r6FezUHlvW","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts newline-delimited JSON (NDJSON/JSON Lines) text into a single JSON array, validating each line and rejecting malformed or duplicate-key records.","exampleAgentPrompt":"Take this NDJSON export and convert it into a proper JSON array so I can pass it to the next step — skip any empty lines: '{\"id\":1,\"name\":\"Alice\"}\n{\"id\":2,\"name\":\"Bob\"}\n'","exampleUseCases":[{"title":"ETL pipeline NDJSON ingestion","prompt":"I've got a raw NDJSON dump from our database export — can you convert it into a JSON array so I can feed it into the filter step? Here's the text: '{\"order_id\":\"A1\",\"amount\":42}\n{\"order_id\":\"A2\",\"amount\":18}\n', and please skip any blank lines."},{"title":"Log file records normalization","prompt":"Our logging service spits out JSON Lines with CRLF endings. Convert this block into a JSON array I can work with: '{\"level\":\"info\",\"msg\":\"started\"}\r\n{\"level\":\"error\",\"msg\":\"failed\"}\r\n'"},{"title":"API response reformatting for downstream tool","prompt":"I got back a newline-delimited JSON response from a vendor API and need to turn it into a standard JSON array before I can sort and filter it — can you parse this NDJSON text for me: '{\"sku\":\"X10\",\"qty\":5}\n{\"sku\":\"Y20\",\"qty\":3}\n'?"}],"resultDescription":"A JSON array containing one element per valid non-empty line from the input NDJSON text. Each element is a parsed JSON object. Malformed JSON lines or objects with duplicate keys cause the request to be rejected with an error rather than silently skipped.","failureModes":["Malformed JSON on any line causes rejection of the entire input with a parse error","Duplicate keys within a single JSON object cause rejection","Missing final newline causes a parse error (trailing newline required)","Input text that is empty or contains only whitespace may return an empty array or error","Non-JSON content (e.g. CSV or plain text) passed as NDJSON will be rejected"],"whenToPreferThis":"Use this endpoint when you have NDJSON or JSON Lines formatted text (from a database export, log file, or streaming API response) and need a standard JSON array for downstream processing. It is the right choice when you need strict validation — it rejects malformed JSON and duplicate keys rather than silently dropping bad records. Prefer it over generic text parsers when correctness and predictability matter. Not suitable for file uploads, streaming inputs, or large datasets that exceed the bounded text input limit.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-24T12:36:12.000Z","isFirstParty":false,"canonicalSlug":"g-forge-ndjson-to-json-array-d6a7bf3b"}