🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

json-long

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-long

JSON.parse / JSON.stringify with long support

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

Build Status

json-long

JSON.parse/stringify with long support. Based on Douglas Crockford JSON.js package and long.js library.

Example:

var JSONLong = require('json-long');

var json = '{ "value" : 9223372036854775807, "v2": 123 }';
console.log('Input:%s\n', json);
var parsedValue = JSONLong.parse(json);
console.log('Parsed long value: ', parsedValue.value.toString());
console.log('Value after performing stringify operation on JS object:', JSONLong.stringify(parsedValue));

Output:

Input: { "value" : 9223372036854775807, "v2": 123 }
Parsed long value:   9223372036854775807
Value after performing stringify operation on JS object: {"value":9223372036854775807,"v2":123}

LICENSE

Apache 2.0

Keywords

JSON

FAQs

Package last updated on 19 Nov 2018

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