python 构造函数 反射_python的反射和自省

2'Deserialize

``fp`` (a ``.read()``-supporting file-like object containing\n    a

JSON document) to a Python object.\n\n    If the contents of ``fp`` is

encoded with an ASCII based encoding other\n    than utf-8 (e.g.

latin-1), then an appropriate ``encoding`` name must\n    be specified.

Encodings that are not ASCII based (such as UCS-2) are\n    not allowed,

and should be wrapped with\n    ``codecs.getreader(fp)(encoding)``, or

simply decoded to a ``unicode``\n    object and passed to

``loads()``\n\n    ``object_hook`` is an optional function that will be

called with the\n    result of any object literal decode (a ``dict``).

The return value of\n    ``object_hook`` will be used instead of the

``dict``. This feature\n    can be used to implement custom decoders

(e.g. JSON-RPC class hinting).\n\n    ``object_pairs_hook`` is an

optional function that will be called with the\n    result of any object

literal decoded with an ordered list of pairs.  The\n    return value

of ``object_pairs_hook`` will be used instead of the ``dict``.\n    This

feature can be used to implement custom decoders that rely on the\n

order that the key and value pairs are decoded (for example,\n

collections.OrderedDict will remember the order of insertion). If\n

``object_hook`` is also defined, the ``object_pairs_hook`` takes

priority.\n\n    To use a custom ``JSONDecoder`` subclass, specify it

with the ``cls``\n    kwarg; otherwise ``JSONDecoder`` is used.\n\n    '

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值