Skip to content

Commit

Permalink
Encode Data using encodeToJSON()
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0c committed Jan 4, 2022
1 parent 1c06b4d commit 7836e27
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,6 @@ extension JSONEncodable where Self: Encodable {
guard let data = try? encoder.encode(self) else {
fatalError("Could not encode to json: \(self)")
}
return data.base64EncodedString(options: Data.Base64EncodingOptions())
return data.encodeToJSON()
}
}

0 comments on commit 7836e27

Please sign in to comment.