Skip to content

RoyiSitbon/ndjson-parse

 
 

Repository files navigation

Build Status NPM Version

Simple ndjson Parser

  • NDJSON - Newline delimited JSON

Specs

https://github.com/ndjson/ndjson-spec

Usage

const ndjsonParser = require('ndjson-parse');

const ndjsonString =  `{"some":"thing"}
{"foo":17,"bar":false,"quux":true}
{"may":{"include":"nested","objects":["and","arrays"]}}`

const parsedNdjson = ndjsonParser(ndjsonString);

console.log(parsedNdjson[0].some) // thing

Example NDJSON

 {"some":"thing"}
 {"foo":17,"bar":false,"quux":true}
 {"may":{"include":"nested","objects":["and","arrays"]}}

(with \n line separators)

About

Simple ndjson parser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%