fromJson method

ParseACL fromJson(
  1. Map<String, dynamic> map
)

Implementation

ParseACL fromJson(Map<String, dynamic> map) {
  final ParseACL parseACL = ParseACL();

  map.forEach((String userId, dynamic permission) {
    if (permission['read'] != null) {
      parseACL.setReadAccess(userId: userId, allowed: permission['read']);
    }
    if (permission['write'] != null) {
      parseACL.setWriteAccess(userId: userId, allowed: permission['write']);
    }
  });
  return parseACL;
}