Converts the function call into a JSON-compatible map.
Map<String, dynamic> toJson() => {'name': name, 'args': args};