toJson method
Implementation
@override
Object toJson() {
return {
if (partIndex.isNotDefault) 'partIndex': partIndex,
if (startIndex.isNotDefault) 'startIndex': startIndex,
if (endIndex.isNotDefault) 'endIndex': endIndex,
if (text.isNotDefault) 'text': text,
};
}