core.Map<core.String, core.dynamic> toJson() => { if (endIndex != null) 'endIndex': endIndex!, if (startIndex != null) 'startIndex': startIndex!, };