
9Vc           @@  sF   d  d l  m Z d  d l m Z m Z d  d l m Z d d  Z d S(   i    (   t   absolute_import(   t   make_responset   current_app(   t   dumpsc         C@  s}   t  j j d i   } t  j rA | j d d  | j d t  n  t |  |  d } t | |  } | j j	 | pu i   | S(   s/   Makes a Flask response with a JSON encoded bodyt   RESTFUL_JSONt   indenti   t	   sort_keyss   
(
   R   t   configt   gett   debugt
   setdefaultt   TrueR   R   t   headerst   extend(   t   datat   codeR   t   settingst   dumpedt   resp(    (    sI   /tmp/pip-build-Q6F9ld/flask-restful/flask_restful/representations/json.pyt   output_json   s    	N(	   t
   __future__R    t   flaskR   R   t   jsonR   t   NoneR   (    (    (    sI   /tmp/pip-build-Q6F9ld/flask-restful/flask_restful/representations/json.pyt   <module>   s   