partial-json-parser

1.2.2 • Public • Published

partial-json-parser

Parse complete javascript objects from partial JSON strings.

Description

Incomplete JSON strings will be parsed to its nearest complete object.

Input: { "name": { "first": "ind", "last": "go

Output: { "name": { "first": "ind" } }

Installation

From the CLI:

npm install --save partial-json-parser

From javascript:

var partialParse = require('partial-json-parser');
var output = partialParse('{"key": "value"');

Alternatively, you can directly use the script in the browser with a script tag.

Readme

Keywords

none

Package Sidebar

Install

npm i partial-json-parser

Weekly Downloads

3,812

Version

1.2.2

License

ISC

Unpacked Size

70.6 kB

Total Files

8

Last publish

Collaborators

  • rgovind92