The command as a map, ready for jsonEncode: name under command, then arguments.
jsonEncode
command
Map<String, Object?> toJson() => <String, Object?>{ 'command': name, ...arguments, };