def format_field_value(field, value):
  if field in JSON_FIELDS:
    if not isinstance(value, basestring):
      return json.dumps(value)
  if field in NUMBER_FIELDS_OR_NULL:
    if not isinstance(value, int) and value is not None:
      return int(value)
  if field in BOOLEAN_FIELDS:
    return str(value).lower() == 'true'
  return value
dataset/ETHPy150Open cloudera/hue/apps/oozie/src/oozie/utils.py/format_field_value/original