text: #-----------------------------------------------------------------------------
  # Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors.
  # All rights reserved.
  #
  # The full license is in the file LICENSE.txt, distributed with this software.
  #-----------------------------------------------------------------------------
  
  #-----------------------------------------------------------------------------
  # Boilerplate
  #-----------------------------------------------------------------------------
  import pytest ; pytest
  
  #-----------------------------------------------------------------------------
  # Imports
  #-----------------------------------------------------------------------------
  
  # Bokeh imports
  from _util_property import _TestHasProps, _TestModel
  from bokeh._testing.util.api import verify_all
  
  # Module under test
  import bokeh.core.property.json as bcpj # isort:skip
  
  #-----------------------------------------------------------------------------
  # Setup
  #-----------------------------------------------------------------------------
  
  ALL = (
      'JSON',
  )
  
  #-----------------------------------------------------------------------------
  # General API
  #-----------------------------------------------------------------------------
  
  
  class Test_JSON:
      def test_valid(self) -> None:
          prop = bcpj.JSON()
  
          assert prop.is_valid(None)
  
          assert prop.is_valid('[]')
          assert prop.is_valid('[{"foo": 10}]')
  
      def test_invalid(self) -> None:
          prop = bcpj.JSON()
  
          assert not prop.is_valid("")
          assert not prop.is_valid("foo")
          assert not prop.is_valid("[]]")
  
          # json stickler for double quotes
          assert not prop.is_valid("[{'foo': 10}]")
  
          assert not prop.is_valid(False)
          assert not prop.is_valid(True)
          assert not prop.is_valid(0)
          assert not prop.is_valid(1)
          assert not prop.is_valid(0.0)
          assert not prop.is_valid(1.0)
          assert not prop.is_valid(1.0+1.0j)
  
          assert not prop.is_valid(())
          assert not prop.is_valid([])
          assert not prop.is_valid({})
          assert not prop.is_valid(_TestHasProps())
          assert not prop.is_valid(_TestModel())
  
      def test_has_ref(self) -> None:
          prop = bcpj.JSON()
          assert not prop.has_ref
  
      def test_str(self) -> None:
          prop = bcpj.JSON()
          assert str(prop) == "JSON"
  
  #-----------------------------------------------------------------------------
  # Dev API
  #-----------------------------------------------------------------------------
  
  #-----------------------------------------------------------------------------
  # Private API
  #-----------------------------------------------------------------------------
  
  #-----------------------------------------------------------------------------
  # Code
  #-----------------------------------------------------------------------------
  
  Test___all__ = verify_all(bcpj, ALL)
  