json-int64
JSON.parse / JSON.stringify with int64 support
Last updated 7 months ago by bgedik .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install json-int64 
SYNC missed versions from official npm registry.

Build Status

json-int64

JSON.parse/stringify with Int64 support. Based on Douglas Crockford JSON.js package and node-int64.js library.

Example:

var JSONInt64 = require('json-int64');

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

Output:

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

LICENSE

Apache 2.0

Current Tags

  • 1.0.2                                ...           latest (7 months ago)

5 Versions

  • 1.0.2                                ...           7 months ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Downloads
Today 0
This Week 8
This Month 9
Last Day 0
Last Week 16
Last Month 84
Dependencies (1)
Dev Dependencies (3)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |