You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wondering if just the comment or the default value is wrong. XMLEncoder's default is .deferredToDate, which matches the behavior of JSONEncoder and JSONDecoder:
Perhaps there is a reason the default date decoding and encoding strategies are different? If not, is the desired behavior that they both be .deferredToDate like JSONEncoder and JSONDecoder? Would it be considered a breaking change to make that fix?
(I should add this has not affected me in production, I have only recently begun exploring this library.)
The text was updated successfully, but these errors were encountered:
A couple of the
XMLDecoder.DateDecodingStrategy
cases describe themselves as the default:XMLCoder/Sources/XMLCoder/Decoder/XMLDecoder.swift
Lines 17 to 23 in 394ddf6
The actual default is
.secondsSince1970
:XMLCoder/Sources/XMLCoder/Decoder/XMLDecoder.swift
Lines 241 to 242 in 394ddf6
I'm wondering if just the comment or the default value is wrong.
XMLEncoder
's default is.deferredToDate
, which matches the behavior ofJSONEncoder
andJSONDecoder
:XMLCoder/Sources/XMLCoder/Encoder/XMLEncoder.swift
Lines 290 to 291 in 394ddf6
Perhaps there is a reason the default date decoding and encoding strategies are different? If not, is the desired behavior that they both be
.deferredToDate
likeJSONEncoder
andJSONDecoder
? Would it be considered a breaking change to make that fix?(I should add this has not affected me in production, I have only recently begun exploring this library.)
The text was updated successfully, but these errors were encountered: