Package Exports
- partial-json-parser
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (partial-json-parser) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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-parserFrom 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.