-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve error message when unpacking non-string keys into an object #127
Comments
Just to clarify a bit, you are not reading decoding the MessagePack as JS |
Ah! I didn't realise that was the appropriate way to do this. I'll give that a try next week. If that works, I'd suggest updating the error message to point at that as a way to fix the problem. |
I just realised I never got back to you here. Using |
I'm using msgpack to serialize python data and then I want to unpack that again in my typescript code. In msgpackr 1.9.9 I was able to unpack a map that had keys that were a custom extension type (e.g. a python tuple or frozenset) I had defined. Upgrading to 1.10.1 I started seeing the
Invalid property type for record
error added in 18f44f8.As discussed below, setting
mapsAsObjects: false
preserves the original key type. Perhaps this error message could be updated to something like:Non-string object key. Try using mapsAsObjects: false
The text was updated successfully, but these errors were encountered: