msgpack / msgpack-javascript

@msgpack/msgpack - MessagePack for JavaScript / msgpack.org[JavaScript/TypeScript/ECMA-262]
https://msgpack.org/
ISC License
1.3k stars 162 forks source link

How to solve the problem of large integer accuracy loss #205

Closed weijian-zhu closed 2 years ago

weijian-zhu commented 2 years ago
import { encode, decode } from '@msgpack/msgpack'
const encoded = encode({num: 86699530287996692 });
const decoded = decode(encoded);
console.log(decoded); // {num: 86699530287996690}