3
T'íc ã @ sò d Z ddlZddlmZmZmZmZmZmZ ej dZ
ej dZej dZej dZ
ej dZd d
ddd
dddZej dZeedddZeedddZedj Zd%eeedddZeeddddZeedd d!Zeed"d#d$ZdS )&z}This module implements a simple JavaScript serializer.
Uses the basestring encode function from simplejson by Bob Ippolito.
é N)ÚIOÚAnyÚDictÚListÚMatchÚUnionz"(\\\\|\\"|[^"])*"z\d+z[a-zA-Z_]\w*z[a-zA-Z_][a-zA-Z0-9_]*$z([\\"]|[^\ -~])z\\z\"z\bz\fz\nz\rz\t)ú\ú"úúÚ
ú
ú z\\u.{4}|\\.)ÚsÚreturnc C s( t tddd}dttj|| d S )N)Úmatchr c S sv | j d}yt| S tk
rp t|}|dk r<d|f S |d8 }d|d? d@ B }d|d@ B }d||f S Y nX d S ) Nr i z\u%04xi Ø é