toJson method
Implementation
@override
Object toJson() => {
if (dataItem case final dataItem?) 'dataItem': dataItem.toJson(),
if (annotations.isNotDefault)
'annotations': [for (final i in annotations) i.toJson()],
if (hasTruncatedAnnotations.isNotDefault)
'hasTruncatedAnnotations': hasTruncatedAnnotations,
};