This docs on this page refers to a PREVIOUS VERSION. For the latest stable release, go to https://docs.bokeh.org/

Archived docs for versions <= 1.0.4 have had to be modified from their original published configuration, and may be missing some features (e.g. source listing)

All users are encourage to update to version 1.1 or later, as soon as they are able.

json — Bokeh 0.12.14 documentation

json

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:

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:

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:

bokeh json app_script.py --indent=2
class JSON(parser)[source]

Subcommand to output applications as serialized JSON

file_contents(args, doc)[source]
extension = 'json'

file extension for output generated by this FileOutputSubcommand

name = 'json'

name for this subcommand