toJson method
Implementation
int toJson() {
switch (this) {
case ChallengeStatus.initiated:
return 0;
case ChallengeStatus.created:
return 1;
case ChallengeStatus.accepted:
return 2;
case ChallengeStatus.declined:
return 3;
}
}