toJson method
Convert the Permission object to a JSON representation.
Implementation
@override
Map<String, dynamic> toJson() {
return {
"threshold": threshold,
"permission_name": permissionName,
"type": type?.name,
"keys": keys?.map((e) => e.toJson()).toList(),
"id": id,
"parent_id": parentId,
"operations": BytesUtils.tryToHexString(operations),
}..removeWhere((k, v) => v == null);
}