mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-19 20:03:16 +00:00
Describe object_pairs_hook in README
This commit is contained in:
parent
caecc0098e
commit
c567ad1c52
1 changed files with 3 additions and 0 deletions
|
@ -90,6 +90,9 @@ Also possible to pack/unpack user's data types. Here is an example for
|
|||
packed_dict = msgpack.packb(useful_dict, default=encode_datetime)
|
||||
this_dict_again = msgpack.unpackb(packed_dict, object_hook=decode_datetime)
|
||||
|
||||
``Unpacker``'s ``object_hook`` callback receives a dict; the
|
||||
``object_pairs_hook`` callback may instead be used to receive a list of
|
||||
key-value pairs.
|
||||
|
||||
INSTALL
|
||||
---------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue