toJson method
Returns the stored information about this PolicyResource in a Map which could be directly used to creates a json entry.
Stores grant and revoke in the Map. The Map is empty if both Sets don't contains entries.
Implementation
@override
Map<String, dynamic> toJson() {
final Map<String, dynamic> newJson = <String, dynamic>{};
newJson[DittoKeys.grant] = _createPermissionString(grant);
newJson[DittoKeys.revoke] = _createPermissionString(revoke);
return newJson;
}