msgpack / msgpack-javascript

@msgpack/msgpack - MessagePack for JavaScript / msgpack.org[JavaScript/TypeScript/ECMA-262]
https://msgpack.org/
ISC License
1.29k stars 161 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}