toJson method
Converts this CharacterDefinition to a JSON map.
Returns a Map<String, dynamic>
representation of the CharacterDefinition,
where each key is a property name and each value is the corresponding property value.
Implementation
Map<String, dynamic> toJson() {
return {
'character': character,
'enclosures': enclosures,
'isAmount': isAmount,
'isDate': isDate,
'isDigit': isDigit,
'isLetter': isLetter,
'isPunctuation': isPunctuation,
'lineLeft': lineLeft,
'lineRight': lineRight,
'matrices': matrices.map((m) => m.toJson()).toList(),
};
}