🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

partial-json-parser

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

partial-json-parser

Parse complete javascript objects from partial JSON strings

1.2.2
latest
npm
Version published
Weekly downloads
3K
-21.78%
Maintainers
1
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 04 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts