Skip to content

Commit

Permalink
Added default date encoding strategy (#43)
Browse files Browse the repository at this point in the history
* #42 - add default date encoding strategy

* Empty commit
  • Loading branch information
Hopsaheysa authored Oct 25, 2023
1 parent d7675fe commit a93e94f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/WultraPowerauthNetworking/WPNHttpRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ import Foundation
import PowerAuth2
import PowerAuthCore

private let jsonEncoder = JSONEncoder()
private let jsonEncoder: JSONEncoder = {
let encoder = JSONEncoder()
encoder.dateEncodingStrategy = .iso8601
return encoder
}()
private let jsonDecoder: JSONDecoder = {
let decoder = JSONDecoder()
decoder.dateDecodingStrategy = .iso8601
Expand Down

0 comments on commit a93e94f

Please sign in to comment.