Option to parse first object only and ignore extra bytes
kjsdf7wr3 opened this issue · 1 comments
kjsdf7wr3 commented
Is it possible to add an option to stop parsing after first complete object and ignore extra bytes?
msgpack-python/msgpack/_unpacker.pyx
Line 155 in edca770
In an appliction I receive data that is padded and currently I remove bytes at the end until there is no more ExtraData exception.
For me it is impossible to know the amount of padding bytes, except that they occur after the first complete object/value.
methane commented
You can get object and remaining data from ExtraData.
msgpack-python/msgpack/exceptions.py
Lines 30 to 39 in edca770