toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json['\$type'] = this.runtimeType.toString().let((type) {
final regExp = new RegExp(r'([A-Za-z0-9]*)(<.>)?');
return regExp.firstMatch(type)!.group(1);
});
if (desc != null) {
json[r'desc'] = desc;
}
if (region != null) {
json[r'region'] = region;
}
if (type != null) {
json[r'type'] = type;
}
if (language != null) {
json[r'language'] = language;
}
if (label != null) {
json[r'label'] = label;
}
return json;
}