toJson method
Implementation
@override
Object toJson() => {
if (name.isNotDefault) 'name': name,
'displayName': displayName,
'studySpec': ?studySpec?.toJson(),
if (state.isNotDefault) 'state': state.toJson(),
'createTime': ?createTime?.toJson(),
if (inactiveReason.isNotDefault) 'inactiveReason': inactiveReason,
};