decode static method

PropertyType? decode(
  1. dynamic json
)

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;
  }
}