ó
k4Vdc        	   @   sŪ   d  Z  d d l m Z d d l m Z d d l m Z d d l m Z e d  d Z	 e Z
 e   Z e j Z e j Z e j Z e j Z e j Z e j Z e e e d d e d e d	  Z d e d
  Z e Z e Z d S(   s(  Python library for serializing any arbitrary object graph into JSON.

jsonpickle can take almost any Python object and turn the object into JSON.
Additionally, it can reconstitute the object back into Python.

The object must be accessible globally via a module and must
inherit from object (AKA new-style classes).

Create an object::

    class Thing(object):
        def __init__(self, name):
            self.name = name

    obj = Thing('Awesome')

Use jsonpickle to transform the object into a JSON string::

    import jsonpickle
    frozen = jsonpickle.encode(obj)

Use jsonpickle to recreate a Python object from a JSON string::

    thawed = jsonpickle.decode(frozen)

.. warning::

    Loading a JSON string from an untrusted source represents a potential
    security vulnerability.  jsonpickle makes no attempt to sanitize the input.

The new object has the same type and data, but essentially is now a copy of
the original.

.. code-block:: python

    assert obj.name == thawed.name

If you will never need to load (regenerate the Python class from JSON), you can
pass in the keyword unpicklable=False to prevent extra information from being
added to JSON::

    oneway = jsonpickle.encode(obj, unpicklable=False)
    result = jsonpickle.decode(oneway)
    assert obj.name == result['name'] == 'Awesome'

i’’’’(   t   pickler(   t	   unpickler(   t   JSONBackend(   t   VERSIONs   jsonpickle.handlerst   encodet   decodec	   	      C   sR   | d	 k r t } n  t j |  d | d | d | d | d | d | d | d | S(
   sI  Return a JSON formatted representation of value, a Python object.

    :param unpicklable: If set to False then the output will not contain the
        information necessary to turn the JSON data back into Python objects,
        but a simpler JSON stream is produced.
    :param max_depth: If set to a non-negative integer then jsonpickle will
        not recurse deeper than 'max_depth' steps into the object.  Anything
        deeper than 'max_depth' is represented using a Python repr() of the
        object.
    :param make_refs: If set to False jsonpickle's referencing support is
        disabled.  Objects that are id()-identical won't be preserved across
        encode()/decode(), but the resulting JSON stream will be conceptually
        simpler.  jsonpickle detects cyclical objects and will break the cycle
        by calling repr() instead of recursing when make_refs is set False.
    :param keys: If set to True then jsonpickle will encode non-string
        dictionary keys instead of coercing them into strings via `repr()`.
    :param warn: If set to True then jsonpickle will warn when it
        returns None for an object which it cannot pickle
        (e.g. file descriptors).
    :param max_iter: If set to a non-negative integer then jsonpickle will
        consume at most `max_iter` items when pickling iterators.

    >>> encode('my string')
    '"my string"'
    >>> encode(36)
    '36'

    >>> encode({'foo': True})
    '{"foo": true}'

    >>> encode({'foo': True}, max_depth=0)
    '"{\'foo\': True}"'

    >>> encode({'foo': True}, max_depth=1)
    '{"foo": "True"}'


    t   backendt   unpicklablet	   make_refst   keyst	   max_deptht   warnt   max_itert   numeric_keysN(   t   Nonet   jsonR    R   (	   t   valueR   R   R	   R
   R   R   R   R   (    (    sa   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/jsonpickle/__init__.pyR   N   s    /	c         C   s.   | d k r t } n  t j |  d | d | S(   s3  Convert a JSON string into a Python object.

    The keyword argument 'keys' defaults to False.
    If set to True then jsonpickle will decode non-string dictionary keys
    into python objects via the jsonpickle protocol.

    >>> str(decode('"my string"'))
    'my string'
    >>> decode('36')
    36
    R   R	   N(   R   R   R   R   (   t   stringR   R	   (    (    sa   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/jsonpickle/__init__.pyR      s    	N(   R   R   (   t   __doc__t
   jsonpickleR    R   t   jsonpickle.backendR   t   jsonpickle.versionR   t
   __import__t   __all__t   __version__R   t   set_preferred_backendt   set_decoder_optionst   set_encoder_optionst   load_backendt   remove_backendt   enable_fallthrought   Truet   FalseR   R   R   t   dumpst   loads(    (    (    sa   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/jsonpickle/__init__.pyt   <module>7   s2   
							4