toJson method

  1. @override
Map<String, dynamic> toJson()
override

Implementation

@override
Map<String, dynamic> toJson() {
  Map<String, dynamic> jsonObject = {};
  if (active != null) {
    jsonObject['active'] = {'directive': _determineDirectiveString(active!)};
  }
  if (suspended != null) {
    jsonObject['suspended'] = {
      'directive': _determineDirectiveString(suspended!)
    };
  }
  if (revoked != null) {
    jsonObject['revoked'] = {
      'directive': _determineDirectiveString(revoked!)
    };
  }
  return jsonObject;
}