toJson method

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

Implementation

@override
Map<String, dynamic> toJson() {
  Map<String, dynamic> jsonObject = {};
  if (protected != null) {
    jsonObject['protected'] = removePaddingFromBase64(
        base64UrlEncode(utf8.encode(jsonEncode(protected!))));
  }
  if (header != null) jsonObject['header'] = header;
  jsonObject['signature'] = signature;
  return jsonObject;
}