class_docstr: A ``PropertyDescriptor`` for Bokeh |DataSpec| properties that serialize to
  field/value dictionaries.
class_docstr_tok: ["A","``","PropertyDescriptor","``","for","Bokeh","|DataSpec|","properties","that","serialize","to","field\/value","dictionaries","."]
docstr: Sets the value of this property from a JSON value.
  
  This method first
  
  Args:
      obj (HasProps) :
  
      json (JSON-dict) :
  
      models(seq[Model], optional) :
  
      setter (ClientSession or ServerSession or None, optional) :
          This is used to prevent "boomerang" updates to Bokeh apps.
          (default: None)
  
          In the context of a Bokeh server application, incoming updates
          to properties will be annotated with the session that is
          doing the updating. This value is propagated through any
          subsequent change notifications that the update triggers.
          The session can compare the event setter to itself, and
          suppress any updates that originate from itself.
  
  Returns:
      None
code: def set_from_json(
      self, obj: HasProps, value: Any, *, setter: Setter | None = None
  ):
      """Sets the value of this property from a JSON value.
  
      This method first
  
      Args:
          obj (HasProps) :
  
          json (JSON-dict) :
  
          models(seq[Model], optional) :
  
          setter (ClientSession or ServerSession or None, optional) :
              This is used to prevent "boomerang" updates to Bokeh apps.
              (default: None)
  
              In the context of a Bokeh server application, incoming updates
              to properties will be annotated with the session that is
              doing the updating. This value is propagated through any
              subsequent change notifications that the update triggers.
              The session can compare the event setter to itself, and
              suppress any updates that originate from itself.
  
      Returns:
          None
  
      """
      if isinstance(value, dict):
          # we want to try to keep the "format" of the data spec as string, dict, or number,
          # assuming the serialized dict is compatible with that.
          old = getattr(obj, self.name)
          if old is not None:
              try:
                  self.property.value_type.validate(old, False)
                  if "value" in value:
                      value = value["value"]
              except ValueError:
                  if isinstance(old, str) and "field" in value:
                      value = value["field"]
              # leave it as a dict if 'old' was a dict
  
      super().set_from_json(obj, value, setter=setter)
  
imports: from __future__ import annotations
  import logging
  from copy import copy
  from types import FunctionType
  from typing import TYPE_CHECKING, Any, Callable, Generic, TypeVar
  from ...util.deprecation import deprecated
  from .singletons import Undefined
  from .wrappers import PropertyValueColumnData, PropertyValueContainer
label_desc: Use image node_id 2 for calling the DataSpecPropertyDescriptor obj's underlying member method code with example usage: obj.set_from_json(obj, value) without return types