decode static method
Implementation
static UserPropertyType? decode(dynamic json) {
if (json == null) {
return null;
}
if (json is! String) {
return null;
}
switch (json) {
case 'INTEGER':
return UserPropertyType.INTEGER;
case 'DOUBLE':
return UserPropertyType.DOUBLE;
case 'STRING':
return UserPropertyType.STRING;
case 'TIMESTAMPZ':
return UserPropertyType.TIMESTAMPZ;
case 'BOOLEAN':
return UserPropertyType.BOOLEAN;
case 'SEMVER':
return UserPropertyType.SEMVER;
default:
return UserPropertyType.UNKNOWN;
}
}