-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
Steps to reproduce:
$ node
> let m = require('msgpack-js')
{ encode: [Function], decode: [Function: decode] }
> m.encode({foo: undefined, hello: 'world'})
<Buffer 82 a3 66 6f 6f c4 a5 68 65 6c 6c 6f a5 77 6f 72 6c 64>
> m.encode({foo: undefined, hello: 'world'}).toString('base64')
'gqNmb2/EpWhlbGxvpXdvcmxk'
$ python
Python 2.7.9 (default, Dec 1 2016, 15:15:08)
[GCC 5.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import msgpack
>>> import base64
>>> a = base64.b64decode('gqNmb2/EpWhlbGxvpXdvcmxk')
>>> msgpack.unpackb(a)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "msgpack/_unpacker.pyx", line 145, in msgpack._unpacker.unpackb (msgpack/_unpacker.cpp:145)
msgpack.exceptions.UnpackValueError: Unpack failed: error = 0
>>>
Even if undefined
isn't part of the msgpack spec, this is weird behavior.
Metadata
Metadata
Assignees
Labels
No labels