JSPM

partial-json-parser

1.1.1
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 20698
    • Score
      100M100P100Q141008F
    • License ISC

    Parse complete javascript objects from partial JSON strings

    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-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.