toJson method
Implementation
Map<String, dynamic> toJson() => {
if (id != null) 'id': id,
if (text != null) 'text': text,
if (label != null) 'label': label,
if (role != null) 'role': role,
if (within != null) 'within': within!.toJson(),
if (occurrence != null) 'occurrence': occurrence,
if (bounds != null) 'bounds': bounds!.toJson(),
};