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,
'codeExecutionResult': {'outcome': outcome.toJson(), 'output': output},
};
}