Parse complete JavaScript objects from partial JSON strings.
Incomplete JSON strings will be parsed to its nearest complete object.
Input:
{ "name": { "first": "ind", "last": "go
Output:
{ "name": { "first": "ind" } }
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.