Skip to content

Commit 3a65d5a

Browse files
committed
chores
1 parent fe974f0 commit 3a65d5a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/Foundation/Dictionary+FoundationUtils.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ extension Dictionary {
5050
public func jsonData(prettify: Bool = false) -> Data? {
5151
guard JSONSerialization.isValidJSONObject(self) else { return nil }
5252
let options = (prettify == true) ? JSONSerialization.WritingOptions.prettyPrinted : JSONSerialization.WritingOptions()
53+
5354
return try? JSONSerialization.data(withJSONObject: self, options: options)
5455
}
5556

@@ -61,6 +62,7 @@ extension Dictionary {
6162
/// - Returns: optional JSON String.
6263
public func jsonString(prettify: Bool = false) -> String? {
6364
guard let jsonData = jsonData(prettify: prettify) else { return nil }
65+
6466
return String(data: jsonData, encoding: .utf8)
6567
}
6668

0 commit comments

Comments
 (0)