[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"howto:ndjson:linux:en":3},{"resolvedFromAlias":4,"canonicalExt":5,"ext":5,"name":6,"category":7,"categoryName":8,"updatedAt":9,"os":10,"osLabel":11,"quickSolution":12,"stepByStep":13,"recommendedSoftware":16,"alternativeMethods":17,"commonIssues":18,"securityNote":43,"extensionPath":44,"extensionLabel":45,"breadcrumbs":46,"metaDescription":56},false,"ndjson","Newline-Delimited JSON (NDJSON)","data","Data","2026-06-12T08:36:32.057Z","linux","Linux","To open .NDJSON files on Linux, open the .ndjson file in a text editor to inspect the contents (each line should be valid JSON).",[14,15],"Open the .ndjson file in a text editor to inspect the contents (each line should be valid JSON).","If file associations are missing, add a MIME association through your desktop’s MIME database mechanisms (the shared-mime-info system uses extension globs to associate types).",[],[],[19,25,31,37],{"title":20,"description":21,"steps":22},"“JSON parse error” when using a normal JSON parser","Many JSON parsers expect a single JSON document (often one object or one array). An NDJSON file contains multiple JSON texts separated by newlines, so a parser that expects one document may fail after the first line.",[23,24],"Confirm the file is NDJSON: each line should be a complete JSON value (commonly an object).","Use a reader/parser that supports NDJSON/newline-delimited JSON (line-by-line JSON streaming), or split the file by lines and parse each line separately.",{"title":26,"description":27,"steps":28},"A line isn’t valid JSON, breaking processing partway through","NDJSON requires each record to be valid JSON on a single line. If a record contains an unescaped newline inside a string or the line is truncated/corrupted, tools may fail at that line.",[29,30],"Locate the failing line number (many tools report it) and inspect that specific line in a text editor.","Fix or remove the malformed record; ensure embedded newlines in strings are properly escaped and each JSON value stays on one line.",{"title":32,"description":33,"steps":34},"The file opens as plain text, but looks “unformatted” or hard to read","NDJSON is optimized for streaming rather than human readability. Each line may be minified JSON with no indentation.",[35,36],"Use a text editor with JSON formatting features to pretty-print individual lines (record-by-record).","If you need a single JSON document, convert the lines into a JSON array with a tool/workflow that reads NDJSON and outputs standard JSON.",{"title":38,"description":39,"steps":40},"Wrong content type / MIME type expectations in an API or pipeline","NDJSON commonly uses the media type application/x-ndjson per the ndjson-spec, but this is not an IANA-registered subtype; some systems may expect something else or treat it as generic text.",[41,42],"If you control the sender, set Content-Type to application/x-ndjson when interacting with systems that recognize the ndjson-spec convention.","If you need a standardized alternative for streaming JSON, consider RFC 7464 JSON Text Sequences (application/json-seq) where supported.","NDJSON is plain text (no macros), but it is often used for large, untrusted data streams; malformed or adversarial JSON can trigger performance or memory issues in parsers—prefer streaming/line-by-line processing rather than loading the entire file at once.","/file-extension/ndjson",".NDJSON",[47,50,53],{"label":48,"to":49},"Home","/",{"label":51,"to":52},"How To","/file-extension",{"label":54,"to":55},"Open .NDJSON on Linux","/how-to/open-ndjson-on-linux","Learn how to open .NDJSON files on Linux with step-by-step instructions, recommended software, and troubleshooting tips."]