decode static method
Implementation
static ExperimentConfig? decode(dynamic json) {
if (json == null) {
return null;
}
if (json is! Map<String, dynamic>) {
return null;
}
return ExperimentConfig(
id: StringDecoder.decode(json['id']),
kind: ExperimentKindExtension.decode(json['kind']),
distribution: ListDecoder.decode(json['distribution'],
(element) => ExperimentCondition.decode(element)),
eventFrequencyConditions: ListDecoder.decode(
json['eventFrequencyConditions'],
(element) => UserEventFrequencyCondition.decode(element)),
baseline: ExperimentVariant.decode(json['baseline']),
variants: ListDecoder.decode(
json['variants'], (element) => ExperimentVariant.decode(element)),
seed: IntDecoder.decode(json['seed']),
frequency: ExperimentFrequency.decode(json['frequency']),
startedAt: DateTimeDecoder.decode(json['startedAt']),
endedAt: DateTimeDecoder.decode(json['endedAt']),
);
}