3
>^,                 @   s|   d Z ddlmZ ddlZddlZdd Zejejdd Zejejdd	 Zejej	d
d Z	ejej
dd Z
dS )a   
Wrapper for the builtin json module that ensures compliance with the JSON spec.

REST framework should always import this wrapper module in order to maintain
spec-compliant encoding/decoding. Support for non-standard features should be
handled by users at the renderer and parser layer.
    )absolute_importNc             C   s   t dt|  d S )Nz2Out of range float values are not JSON compliant: )
ValueErrorrepr)o r   H/tmp/pip-build-8app2_gc/djangorestframework/rest_framework/utils/json.pystrict_constant   s    r   c              O   s   |j dd tj| |S )N	allow_nanF)
setdefaultjsondump)argskwargsr   r   r   r      s    r   c              O   s   |j dd tj| |S )Nr	   F)r
   r   dumps)r   r   r   r   r   r      s    r   c              O   s   |j dt tj| |S )Nparse_constant)r
   r   r   load)r   r   r   r   r   r      s    r   c              O   s   |j dt tj| |S )Nr   )r
   r   r   loads)r   r   r   r   r   r   %   s    r   )__doc__
__future__r   	functoolsr   r   wrapsr   r   r   r   r   r   r   r   <module>   s   