def serialize_json(obj, pretty=False, indent=None, **kwargs):
 for name in ['allow_nan', 'separators', 'sort_keys']:
  if (name in kwargs):
   raise ValueError(('The value of %r is computed internally, overriding is not permissable.' % name))
 pretty = settings.pretty(pretty)
 if pretty:
  separators = (',', ': ')
 else:
  separators = (',', ':')
 if (pretty and (indent is None)):
  indent = 2
 return json.dumps(obj, cls=BokehJSONEncoder, allow_nan=False, indent=indent, separators=separators, sort_keys=True, **kwargs)

def serialize_json ( obj , pretty = False , indent = None , ** kwargs ) : for name in [ 'allow_nan' , 'separators' , 'sort_keys' ] : if ( name in kwargs ) : raise ValueError ( ( 'The value of %r is computed internally, overriding is not permissable.' % name ) ) pretty = settings . pretty ( pretty ) if pretty : separators = ( ',' , ': ' ) else : separators = ( ',' , ':' ) if ( pretty and ( indent is None ) ) : indent = 2 return json . dumps ( obj , cls = BokehJSONEncoder , allow_nan = False , indent = indent , separators = separators , sort_keys = True , ** kwargs )
return a serialized json representation of objects .