json-long
JSON.parse / JSON.stringify with long support
Last updated 2 years ago by mohyt .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install json-long 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.0.2                                ...           latest (2 years ago)

2 Versions

  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (2)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |