toJson method
Implementation
@override
Object toJson() => {
if (scalar case final scalar?) 'scalar': scalar.toJson(),
if (tensor case final tensor?) 'tensor': tensor.toJson(),
if (blobs case final blobs?) 'blobs': blobs.toJson(),
if (wallTime case final wallTime?) 'wallTime': wallTime.toJson(),
if (step.isNotDefault) 'step': step.toString(),
};