toJsonString method
Converts character definitions to a JSON string.
Returns a JSON string representation of all character definitions.
Implementation
String toJsonString() {
_sortDefinitions();
final Map<String, dynamic> matricesMap = {
'templates': definitions.map((template) => template.toJson()).toList(),
};
return jsonEncode(matricesMap);
}