a
    na                     @  sj   d Z ddlmZ ddlZeeZddlmZ ddl	m
Z
 ddlmZ d	d
lmZ dZG dd deZdS )ao  
To generate the serialized JSON representation for a Bokeh application
from a single Python script, pass the script name to ``bokeh json`` on the
command line:

.. code-block:: sh

    bokeh json app_script.py

The generated JSON will be saved in the current working directory with
the name ``app_script.json``.

Applications can also be created from directories. The directory should
contain a ``main.py`` (and any other helper modules that are required) as
well as any additional assets (e.g., theme files). Pass the directory name
to ``bokeh json`` to generate the JSON:

.. code-block:: sh

    bokeh json app_dir

By default, the generated JSON is output as one line, with no indentation.
To generate "pretty printed" JSON on multiple lines, you can specify an
indentation level with the ``--indent`` argument:

.. code-block:: sh

    bokeh json app_script.py --indent=2

    )annotationsN)	Namespace   )Document   )Argument   )FileOutputSubcommand)JSONc                   @  sT   e Zd ZdZdZdZdZed de	de
dddffe  Zd	d
ddddZdS )r
   z; Subcommand to output applications as serialized JSON

    Zjsonz.Create JSON files for one or more applicationsz--indentZLEVELz indentation to use when printingN)metavartypehelpdefaultr   r   str)argsdocreturnc                 C  s   |j |jdS )z


        )indent)Zto_json_stringr   )selfr   r    r   =lib/python3.9/site-packages/bokeh/command/subcommands/json.pyfile_contents`   s    zJSON.file_contents)__name__
__module____qualname____doc__name	extensionr   r	   Z	files_argr   intZ
other_argsr   r   r   r   r   r   r
   F   s   r
   )r   Z
__future__r   ZloggingZ	getLoggerr   logargparser   Zdocumentr   Z
subcommandr   Zfile_outputr	   __all__r
   r   r   r   r   <module>   s   "
