Add serialization and equality checking to permission object