Package detail

line-json

TimothyGu5.1kMIT2.0.0

Stringify and parse lines of JSON as an array

json

readme

line-json

Parses and stringifies JSON arrays delimited by lines.

Build Status devDependencies Status NPM version

This is useful when you have a large amount of data in an array, and you feel that the bracket expression is too clumsy.

Installation

npm install line-json

Usage

var lineJSON = require('line-json')

var result = lineJSON.stringify([ 'a', 'b', { c: 'd' } ])
// '"a"\n"b"\n{"c":"d"}'

lineJSON.parse(result)
// [ 'a', 'b', { c: 'd' } ]

License

MIT

changelog

Change Log

All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.

2.0.0 - 2015-11-05

Added

  • Allow empty lines in LineJSON.parse

1.0.0 - 2015-08-10

Added

  • Initial stable release