B
    ú‹dG  ã               @   sN   d Z ddlZddlmZ G dd„ dejƒZdd„ Zdd	„ Zd
d„ Zdd„ Z	dS )zÒ
    sphinx.util.jsonimpl
    ~~~~~~~~~~~~~~~~~~~~

    JSON serializer implementation wrapper.

    :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
é    N)Ú
UserStringc                   s    e Zd ZdZ‡ fdd„Z‡  ZS )ÚSphinxJSONEncoderz5JSONEncoder subclass that forces translation proxies.c                s   t |tƒrt|ƒS tƒ  |¡S )N)Ú
isinstancer   ÚstrÚsuperÚdefault)ÚselfÚobj)Ú	__class__© ús/work/yifan.wang/ringdown/master-ringdown-env/lib/python3.7/site-packages/sphinxcontrib/serializinghtml/jsonimpl.pyr      s    
zSphinxJSONEncoder.default)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Ú__classcell__r   r   )r
   r   r      s   r   c             O   s    t |d< tj| |f|ž|Ž d S )NÚcls)r   ÚjsonÚdump)r	   ÚfpÚargsÚkwdsr   r   r   r      s    r   c             O   s   t |d< tj| f|ž|ŽS )Nr   )r   r   Údumps)r	   r   r   r   r   r   r   "   s    r   c              O   s   t j| |ŽS )N)r   Úload)r   r   r   r   r   r   (   s    r   c              O   s   t j| |ŽS )N)r   Úloads)r   r   r   r   r   r   -   s    r   )
r   r   Úcollectionsr   ÚJSONEncoderr   r   r   r   r   r   r   r   r   Ú<module>	   s   	