toJson method
Converts a SELinuxOptions instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
if (level != null) {
jsonData['level'] = level!;
}
if (role != null) {
jsonData['role'] = role!;
}
if (type != null) {
jsonData['type'] = type!;
}
if (user != null) {
jsonData['user'] = user!;
}
return jsonData;
}