wultra / networking-apple

A high-level networking SDK for PowerAuth-based endpoints.
Apache License 2.0
0 stars 0 forks source link

Improve date deserialization #58

Open kober32 opened 5 months ago

kober32 commented 5 months ago

We now expect dates to be in format iso8601, but the default iOS implementation fails to decode various formats that are valid.

we should do a custom deserialization where we try to deserialize and if the deserialization fails, we should try custom deserialization.

We can inspire here: https://stackoverflow.com/questions/46537790/iso8601-date-json-decoding-using-swift4

kober32 commented 5 months ago

Code link: https://github.com/wultra/networking-apple/blob/develop/Sources/WultraPowerauthNetworking/WPNHttpRequest.swift#L21