Ńň
^čbIc           @   s;   d  Z  d d k l Z d   Z e d j o e   n d S(   s  Using simplejson from the shell to validate and
pretty-print::

    $ echo '{"json":"obj"}' | python -msimplejson.tool
    {
        "json": "obj"
    }
    $ echo '{ 1.2:3.4}' | python -msimplejson.tool
    Expecting property name: line 1 column 2 (char 2)
i˙˙˙˙(   t
   simplejsonc          C   s5  d d  k  }  t |  i  d j o |  i } |  i } n t |  i  d j o# t |  i d d  } |  i } na t |  i  d j o0 t |  i d d  } t |  i d d  } n t d |  i d f   y t i |  } Wn! t	 j
 o } t |   n Xt i
 | | d	 t d
 d | i d  d  S(   Ni˙˙˙˙i   i   t   rbi   t   wbs   %s [infile [outfile]]i    t	   sort_keyst   indenti   s   
(   t   syst   lent   argvt   stdint   stdoutt   opent
   SystemExitR    t   loadt
   ValueErrort   dumpt   Truet   write(   R   t   infilet   outfilet   objt   e(    (    sF   /usr/local/lib/python2.6/dist-packages/django/utils/simplejson/tool.pyt   main   s"    	t   __main__N(   t   __doc__t   django.utilsR    R   t   __name__(    (    (    sF   /usr/local/lib/python2.6/dist-packages/django/utils/simplejson/tool.pyt   <module>
   s   	