File: //opt/alt/python27/lib64/python2.7/site-packages/psycopg2/_json.pyo
�
Tc @ s d Z d d l Z d d l m Z m Z d d l m Z m Z m Z e j d d k rf d d l Z n* y d d l
Z Wn e k
r� d Z n Xd Z
d Z d Z d
Z d e f d � � YZ d e d d d d
d � Z d e d d � Z d e d d � Z d d d � Z d
d � Z d S( s� Implementation of the JSON adaptation objects
This module exists to avoid a circular import problem: pyscopg2.extras depends
on psycopg2.extension, so I can't create the default JSON typecasters in
extensions importing register_json from extras.
i����N( t ISQLQuotet QuotedString( t new_typet new_array_typet
register_typei i ir i� i� i� t Jsonc B s5 e Z d Z d d � Z d � Z d � Z d � Z RS( s�
An `~psycopg2.extensions.ISQLQuote` wrapper to adapt a Python object to
:sql:`json` data type.
`!Json` can be used to wrap any object supported by the provided *dumps*
function. If none is provided, the standard :py:func:`json.dumps()` is
used (`!simplejson` for Python < 2.6;
`~psycopg2.extensions.ISQLQuote.getquoted()` will raise `!ImportError` if
the module is not available).
c C sI | | _ | d k r! | | _ n$ t d k r<