Comments (4)
I can't follow your code and it contains syntax errors. Here's a cleaned up version of it:
let obj1 = [[100, 1000.01]];
let msg1 = serializeMsgPack(obj1);
let obj2 = [100, 100, "ok", msg1];
let msg2 = serializeMsgPack(obj2);
let obj2_ = deserializeMsgPack(msg2);
let msg1_ = obj2[3];
let obj1_ = deserializeMsgPack(msg1_);
console.log(obj1_[0][1]); // 5.262076770253218e+228
Can you please verify the correctness of my version and that it still produces the wrong result for you? Because this code works as expected for me in Firefox 64 on Windows 10.
If the error remains for you, please specify what environment you used.
from msgpack.js.
chrome 72.0.3626.119(64 bit) for Mac
from msgpack.js.
console.log("r");
let obj1 = [[100, 1000.01]];
let msg1 = serializeMsgPack(obj1);
let obj2 = [100, 100, "ok", msg1];
let msg2 = serializeMsgPack(obj2);
let obj2_ = deserializeMsgPack(msg2);
let msg1_ = obj2_[3];
let obj1_ = deserializeMsgPack(msg1_);
console.log(obj1_[0][1]); // 5.262076770253218e+228
log:
r
5.262076770253218e+228
from msgpack.js.
Sorry, I can't reproduce this. The closest environment I have is Chrome 72.0.3626.109 (64 bit) on Windows 10. For me, the log prints the expected "1000.01", as it does in Firefox. So I'd suggest you report the bug in Chrome for Mac.
from msgpack.js.
Related Issues (20)
- Any plan to publish to NPM as a module? HOT 5
- Does it work with System.Decimal? HOT 1
- Date deserialisation doesn't cope with pre-epoch dates HOT 2
- Copy to TypeScript HOT 2
- Encoding in python and decoding in javascript HOT 5
- Detect Web Workers environment HOT 3
- Wrong float deserialization from typed arrays with non-zero byteOffset
- The example of javascript client and server HOT 1
- No "default" case in 'append' HOT 2
- Doesn't handle uint64 particularly well HOT 7
- Add .d.ts typings file HOT 2
- Skip serializing properties with `undefined` values HOT 1
- DataView read wrong value on msgpack deserialized data HOT 3
- Options undocumented HOT 1
- No support for Lz4 compression as C# package provide HOT 1
- Proposal: converting Integer with DataView
- Callback for ext
- Serializer also serializes properties in object prototype HOT 1
- Wrong array serialization HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msgpack.js.