def _bool_to_json(value):
 if isinstance(value, bool):
  value = ('true' if value else 'false')
 return value

def _bool_to_json ( value ) : if isinstance ( value , bool ) : value = ( 'true' if value else 'false' ) return value
coerce value to an json-compatible representation .