toJsonString method
Converts this CharacterDefinition to a JSON string.
Returns a String containing a JSON representation of the CharacterDefinition. This method uses toJson to create a map and then encodes it to a JSON string.
Example:
final charDef = CharacterDefinition(character: 'A', isLetter: true);
final jsonString = charDef.toJsonString();
print(jsonString); // Prints the JSON representation as a string
Implementation
String toJsonString() => jsonEncode(toJson());