FeatureValue.fromJson constructor

FeatureValue.fromJson(
  1. Object? j
)

Implementation

factory FeatureValue.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return FeatureValue(
    boolValue: switch (json['boolValue']) {
      null => null,
      Object $1 => decodeBool($1),
    },
    doubleValue: switch (json['doubleValue']) {
      null => null,
      Object $1 => decodeDouble($1),
    },
    int64Value: switch (json['int64Value']) {
      null => null,
      Object $1 => decodeInt64($1),
    },
    stringValue: switch (json['stringValue']) {
      null => null,
      Object $1 => decodeString($1),
    },
    boolArrayValue: switch (json['boolArrayValue']) {
      null => null,
      Object $1 => BoolArray.fromJson($1),
    },
    doubleArrayValue: switch (json['doubleArrayValue']) {
      null => null,
      Object $1 => DoubleArray.fromJson($1),
    },
    int64ArrayValue: switch (json['int64ArrayValue']) {
      null => null,
      Object $1 => Int64Array.fromJson($1),
    },
    stringArrayValue: switch (json['stringArrayValue']) {
      null => null,
      Object $1 => StringArray.fromJson($1),
    },
    bytesValue: switch (json['bytesValue']) {
      null => null,
      Object $1 => decodeBytes($1),
    },
    structValue: switch (json['structValue']) {
      null => null,
      Object $1 => StructValue.fromJson($1),
    },
    metadata: switch (json['metadata']) {
      null => null,
      Object $1 => FeatureValue_Metadata.fromJson($1),
    },
  );
}