{"id":13469058,"url":"https://github.com/ndjson/ndjson-spec","last_synced_at":"2026-03-12T21:07:03.484Z","repository":{"id":9351710,"uuid":"11203131","full_name":"ndjson/ndjson-spec","owner":"ndjson","description":"Specification","archived":false,"fork":false,"pushed_at":"2022-10-20T14:43:02.000Z","size":35,"stargazers_count":732,"open_issues_count":13,"forks_count":30,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-04-13T23:12:26.866Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ndjson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-05T15:50:04.000Z","updated_at":"2025-04-13T22:46:04.000Z","dependencies_parsed_at":"2023-01-13T15:18:34.703Z","dependency_job_id":null,"html_url":"https://github.com/ndjson/ndjson-spec","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ndjson/ndjson-spec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndjson%2Fndjson-spec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndjson%2Fndjson-spec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndjson%2Fndjson-spec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndjson%2Fndjson-spec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ndjson","download_url":"https://codeload.github.com/ndjson/ndjson-spec/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndjson%2Fndjson-spec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30444320,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T20:23:30.529Z","status":"ssl_error","status_checked_at":"2026-03-12T20:23:14.027Z","response_time":114,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T15:01:25.372Z","updated_at":"2026-03-12T21:07:03.453Z","avatar_url":"https://github.com/ndjson.png","language":null,"readme":"---\r\ntitle: NDJSON - Newline delimited JSON\r\nversion: 1.0.0\r\nlast_update: 2014-10-19\r\ncreated: 2013-07-05\r\n---\r\n\r\n# NDJSON - Newline delimited JSON\r\n\r\nA standard for delimiting JSON in stream protocols.\r\n\r\n## 1. Introduction\r\n\r\n## 1.1 About\r\n\r\nThere is currently no standard for transporting instances of JSON text within a stream protocol, apart from \\[[Websockets]\\], which is unnecessarily complex for non-browser applications.\r\n\r\nA common use case for NDJSON is delivering multiple instances of JSON text through streaming protocols like TCP or UNIX Pipes. It can also be used to store semi-structured data.\r\n\r\n### 1.2 Terminology\r\nThe key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this document are to be interpreted as described in RFC 2119. \\[[RFC2119]\\]\r\n\r\n## 2. Example NDJSON\r\n\r\n~~~~~\r\n {\"some\":\"thing\"}\r\n {\"foo\":17,\"bar\":false,\"quux\":true}\r\n {\"may\":{\"include\":\"nested\",\"objects\":[\"and\",\"arrays\"]}}\r\n~~~~~\r\n(with `\\n` line separators)\r\n\r\n## 3. Functional Specification\r\n\r\n### 3.1 Serialization\r\n\r\nEach JSON text MUST conform to the \\[[RFC8259]\\] standard and MUST be written to the stream followed by the newline character `\\n` (0x0A). The newline character MAY be preceded by a carriage return `\\r` (0x0D). The JSON texts MUST NOT contain newlines or carriage returns.\r\n\r\nAll serialized data MUST use the UTF8 encoding.\r\n\r\n### 3.2 Parsing\r\n\r\nThe parser MUST accept newline as line delimiter `\\n` (0x0A) as well as carriage return and newline `\\r\\n` (0x0D0A). \r\n\r\nIf the JSON text is not parsable, the parser SHOULD raise an error. The parser MAY silently ignore empty lines, e.g. `\\n\\n`. This behavior MUST be documented and SHOULD be configurable by the user of the parser.\r\n\r\n### 3.3 MediaType and File Extensions\r\n\r\nThe MediaType \\[[RFC6838]\\] for Newline Delimited JSON SHOULD be _application/x-ndjson_.\r\n\r\nWhen saved to a file, the file extension SHOULD be _.ndjson_.\r\n\r\n## 4. Copyright\r\n\r\nThis specification is copyrighted by the authors named in section 4.1. It is free to use for any purposes commercial or non-commercial.\r\n\r\n### 4.1 Authors\r\n\r\nThe following authors are responsible for the NDJSON core-specification:\r\n\r\n~~~~\r\nThorsten Hoeger\r\nTaimos GmbH\r\nHohenzollernstrasse 32\r\nD-73262 Reichenbach\r\nthorsten.hoeger@taimos.de\r\n~~~~\r\n~~~~\r\nChris Dew\r\nchris.dew@barricane.com\r\n~~~~\r\n~~~~\r\nFinn Pauls\r\nich@finnpauls.de\r\n~~~~\r\n~~~~\r\nJim Wilson\r\n~~~~\r\n\r\n### 4.2 Contact\r\n\r\nThis specification and any related work is located at \u003chttps://github.com/ndjson\u003e. \r\nDiscussion and help is located at \u003chttps://github.com/ndjson/ndjson-spec/issues\u003e. \r\n\r\n## A. References\r\n\r\n### A.1 Normative\r\n\r\n[RFC2119]: https://tools.ietf.org/html/rfc2119 \"RFC 2119 - Key words for use in RFCs to Indicate Requirement Levels\"\r\n\\[[RFC2119]\\]: RFC 2119 - Key words for use in RFCs to Indicate Requirement Levels\r\n\r\n[RFC8259]: https://tools.ietf.org/html/rfc8259 \"RFC 8259 -  The JavaScript Object Notation (JSON) Data Interchange Format\"\r\n\\[[RFC8259]\\]: RFC 8259 -  The JavaScript Object Notation (JSON) Data Interchange Format\r\n\r\n[RFC4627]: https://tools.ietf.org/html/rfc4627 \"RFC 4627 - The application/json Media Type for JavaScript Object Notation (JSON)\"\r\n\\[[RFC4627]\\]: RFC 4627 - The application/json Media Type for JavaScript Object Notation (JSON)\r\n\r\n[RFC6838]: https://tools.ietf.org/html/rfc6838 \"RFC 6838 - Media Type Specifications and Registration Procedures\"\r\n\\[[RFC6838]\\]: RFC 6838 - Media Type Specifications and Registration Procedures\r\n\r\n[RFC2616]: https://tools.ietf.org/html/rfc2616 \"RFC 2616 - Hypertext Transfer Protocol -- HTTP/1.1\"\r\n\\[[RFC2616]\\]: RFC 2616 - Hypertext Transfer Protocol -- HTTP/1.1\r\n\r\n### A.1 Informative\r\n\r\n[TCP]: https://tools.ietf.org/html/rfc793 \"RFC 793 - Transmission Control Protocol\"\r\n\\[[TCP]\\]: RFC 793 - Transmission Control Protocol\r\n\r\n[Websockets]: https://tools.ietf.org/html/rfc6455 \"RFC 6455 - The WebSocket Protocol\"\r\n\\[[Websockets]\\]: RFC 6455 - The WebSocket Protocol\r\n","funding_links":[],"categories":["Others","Format Extensions","Resources","Recently Updated"],"sub_categories":["Data Formats","[May 03, 2025](/content/2025/05/03/README.md)"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndjson%2Fndjson-spec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fndjson%2Fndjson-spec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndjson%2Fndjson-spec/lists"}