-
-
Couldn't load subscription status.
- Fork 77
Closed
Description
In JSON and javascript , map keys have to be strings, but in MessagePack keys can be numbers.
Is there a way to force keys in a javascript object to be numbers when msgpack encoding is done?
javascript Map allows to use numbers as keys, but looks like objects encoded from a map cannot be de decoded :
let mapExemple = new Map()
mapExemple.set(1,"map")
mapExemple.set(3,"test")
let mpackedEx = msgpack.encode(mapExemple)
console.log(msgPackDecode(mpackedEx))
{}
Metadata
Metadata
Assignees
Labels
No labels