Issue #6 new

add object_hook support

namlook
created an issue

Json and SimpleJson allow to pass object_hook to allow to serialize/deserialize custom types:

{{{

!python

Example usage (serialization)::

>>> json.dumps(..., default=json_util.default)

Example usage (deserialization)::

>>> json.loads(..., object_hook=json_util.object_hook)

}}}

unfortunately, anyjson doesn't provide an interface to pass such hook. It would be great to be able to do:

{{{

!python

anyjson.serialize(obj_to_serialize, hook=the_hook) }}}