Describe object_pairs_hook in README

This commit is contained in:
Joel Nothman 2012-12-06 23:10:25 +11:00
parent caecc0098e
commit c567ad1c52

View file

@ -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
---------