title: How to pass arbitrary `json` data from python to bokeh using `CustomJS`
body: <p>I am working on a bokeh visualisation, one requirement is that it runs without a server, as such I am using <code>CustomJS</code> to implement interactivity on the client side using javascript. Passing <code>ColumnDataSource</code>s to <code>CustomJS</code> works fine to update plots interactively.</p>
  
  <p>What I cannot do however, is just embed some arbitrary <code>json</code> data into the output html. See the self contained example below:</p>
  
  <pre><code>from bokeh.io import output_file
  from bokeh.layouts import widgetbox
  from bokeh.models import CustomJS
  from bokeh.models.widgets import Div, Button
  from bokeh.plotting import show
  
  data_for_client = {
      "x": 3,
      "y": {
          "foo": [1, 2, 3],
          "bar": {"some_bar": "doge", "other bar": "much json"}
      },
      "z": [[1, 2], [3, 4]]
  }
  
  callback = CustomJS(args={"data_for_client": data_for_client}, code="""
      console.log(data_for_client);
  """)
  
  content = widgetbox(
      Button(label="click here", callback=callback),
      Div(text="some complicated interactive stuff based on json content here")
  )
  
  output_file("issue.html")
  show(content)
  </code></pre>
  
  <p>In my case, the <code>data_for_client</code> is a complicated deeply nested <code>json</code>, different parts of this <code>json</code> are used depending on user interaction with some widgets. </p>
  
  <p>I do not need to make any modifications to the <code>json</code> data based on user interaction,  or attach any listeners or anything special. I just need the content of the json value to be available in the <code>CustomJS</code> callback.</p>
  
  <p>For simple column data, I can wrap my data in a <code>ColumnDataSource</code> and pass that as an arg to <code>CustomJS</code>, however I do not find anything similar for plain <code>json</code> data. The code above fails with message:</p>
  
  <pre><code>ValueError: expected an element of Dict(String, Instance(Model)), got {'data_for_client': {'x': 3, 'y': {'foo': [1, 2, 3], 'bar': {'some_bar': 'doge', 'other bar': 'much json'}}, 'z': [[1, 2], [3, 4]]}}
  </code></pre>