Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/psycopg2/__pycache__/_json.cpython-39.pyc
Ðазад
a d�h� � @ s� d Z ddlZddlmZmZ ddlmZmZmZ ddlm Z dZ dZdZd Z G d d� de�Zddd�Zddd�Zddd�Zddd�Zddd�ZdS )z�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. � N)� ISQLQuote�QuotedString)�new_type�new_array_type� register_type)�PY2�r �� i� i� c @ sP e Zd ZdZddd�Zdd� Zdd� Zd d � Zdd� Ze rDd d� Z ndd� Z dS )�Jsona 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. Nc C s || _ d | _|ptj| _d S �N)�adapted�_conn�json�dumps�_dumps)�selfr r � r �~/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/psycopg2/_json.py�__init__9 s z Json.__init__c C s |t u r| S d S r )r )r �protor r r �__conform__>