Serialize an object. Returns: Implementation-dependent bytes-like object.
(obj)
| 21 | |
| 22 | @staticmethod |
| 23 | def dumps(obj): |
| 24 | """ |
| 25 | Serialize an object. |
| 26 | |
| 27 | Returns: |
| 28 | Implementation-dependent bytes-like object. |
| 29 | """ |
| 30 | return msgpack.dumps(obj, use_bin_type=True) |
| 31 | |
| 32 | @staticmethod |
| 33 | def loads(buf): |