Comments (3)
Sorry, where in the spec does it say something incompatible with Map
s? As far as I can tell, the spec actually places no restriction on map keys, so the current implementation seems to be non-compliant, and the only way to make it compliant is to decode into Map
s instead of plain objects.
from msgpack-javascript.
To concur with what @joshyrobot is saying, what we're looking for is not so much a way to encode maps in addition to objects, we're looking for a way to encode maps instead of objects— something like an alternate mode in which maps are always created and consumed and vanilla javascript objects are never created or consumed.
from msgpack-javascript.
Thank you for your report.
This is the specification and won't be fixed because MessagePack is designed to communicate in multi-languages. I won't add any flavors by default.
However, any JavaScript programs use lots of non-primitive objects, so the MessagePack spec has extensions.
See extension types for details.
Also, I'd like to add extensions to handle non-primitive objects like ES2015's Map, just like as browsers do.
from msgpack-javascript.
Related Issues (20)
- Cannot use reusable encoders/decoders in custom codecs
- [bug] decode throws RangeError on empty Uint8Array HOT 2
- raw_ref type? HOT 2
- How can we convert the msgpack-encoded str back to the origin info HOT 2
- How to solve the problem of large integer accuracy loss
- Encoder Reuse Bug? HOT 2
- Cannot find module
- RangeError: Start offset undefined is outside the bounds of the buffer HOT 3
- Non reversible timestamp encoding HOT 1
- feature request: option to disable TEXT_ENCODING env check HOT 4
- There has a way to decode extension type from another language? HOT 3
- can i override the int64 decoder?
- Invalid integer string convertion from PHP serialized .msgpack HOT 1
- error on https://msgpack.org/
- Decoding of 32 bit floats is not precise HOT 3
- npm `latest` tag on `3.0.0-beta`
- add deno example with `import 'npm:@msgpack/msgpack'` HOT 1
- Encoder / Decoder classes dont work with `new ExtensionCodec()` for handling Set and Map in typescript
- Need support bigint HOT 2
- Error in ExtensionCodec.ts?
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-javascript.