in facebook_business/typechecker.py [0:0]
def convert_string_to_prim_type(self, primitive_type, value):
if primitive_type in self._enum_data:
return value
elif primitive_type in ("unsigned int", "int"):
return int(value)
elif primitive_type == "bool":
if value in ("false", "0", "null"):
return False
return True
elif primitive_type == "float":
return float(value)
elif primitive_type == "datetime":
return value
elif primitive_type == "string":
return str(value)
elif primitive_type == "Object":
return value
else:
raise FacebookBadParameterTypeException('Fail to convert from ' +
value.__class__.__name__ + ' to ' + str(primitive_type))