toJson method
Convert the Part content to json format.
Implementation
@override
Object toJson() {
final superJson = super.toJson() as Map<String, Object?>;
return <String, Object?>{
...superJson,
'executableCode': {'language': language.toJson(), 'code': code},
};
}