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