toJson method
Implementation
Map<String, Object?> toJson() => {
'scenario': scenario,
'level': level,
if (step != null) 'step': step,
if (stepIndex != null) 'stepIndex': stepIndex,
if (overflows > 0) 'overflows': overflows,
if (failure != null) 'failure': failure,
};