U
    /e                     @  sF   d Z ddlmZ ddlZeeZddlmZ dZ	G dd deZ
dS )	z Provide the JSON property.

    )annotationsN   )String)JSONc                      s"   e Zd ZdZd fdd	Z  ZS )r   a   Accept JSON string values.

    The value is transmitted and received by BokehJS as a *string*
    containing JSON content. i.e., you must use ``JSON.parse`` to unpack
    the value into a JavaScript hash.

    Args:
        default (string, optional) :
            A default value for attributes created from this property to
            have.

        help (str or None, optional) :
            A documentation string for this property. It will be automatically
            used by the :ref:`bokeh.sphinxext.bokeh_prop` extension when
            generating Spinx documentation. (default: None)

        serialized (bool, optional) :
            Whether attributes created from this property should be included
            in serialization (default: True)

        readonly (bool, optional) :
            Whether attributes created from this property are read-only.
            (default: False)

    Tc                   sX   t  || zdd l}|| W n. tk
rR   |s<dnd|}t|Y nX d S )Nr    zexpected JSON text, got )supervalidatejsonloads
ValueError)selfvalueZdetailr	   msg	__class__ </tmp/pip-unpacked-wheel-f5fndrjf/bokeh/core/property/json.pyr   @   s    zJSON.validate)T)__name__
__module____qualname____doc__r   __classcell__r   r   r   r   r   &   s   r   )r   
__future__r   logging	getLoggerr   logZ	primitiver   __all__r   r   r   r   r   <module>   s   
