Skip to content

Commit 56c5b0a

Browse files
Improved payload size slightly when sending JSON
1 parent 61f89bf commit 56c5b0a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/WebPush/WebPushManager.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,6 +1078,7 @@ extension WebPushManager {
10781078
case .json(let json):
10791079
let encoder = JSONEncoder()
10801080
encoder.dateEncodingStrategy = .millisecondsSince1970
1081+
encoder.outputFormatting = [.withoutEscapingSlashes]
10811082
return try encoder.encode(json)
10821083
}
10831084
}

0 commit comments

Comments
 (0)