Skip to content

unscrambl/json-int64

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published