Enumeration
JSONDecoder.DateDecodingStrategy
iOS 8.0+
iPadOS 8.0+
Mac Catalyst 8.0+
macOS 10.10+
tvOS 9.0+
watchOS 2.0+
The strategies available for formatting dates when decoding them from JSON.
enum DateDecodingStrategy
Topics
Enumeration Cases
case custom((any Decoder) throws -> Date)Decode theDateas a custom value decoded by the given closure.case deferredToDateDefer toDatefor decoding. This is the default strategy.case iso8601Decode theDateas an ISO-8601-formatted string (in RFC 3339 format).case millisecondsSince1970Decode theDateas UNIX millisecond timestamp from a JSON number.case secondsSince1970Decode theDateas a UNIX timestamp from a JSON number.
Type Properties
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype